collab/mermaid/docs/syntax/stateDiagram.mdblame
View source
6dd74de1> **Warning**
6dd74de2>
6dd74de3> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
6dd74de4>
6dd74de5> ## Please edit the corresponding file in [/packages/mermaid/src/docs/syntax/stateDiagram.md](../../packages/mermaid/src/docs/syntax/stateDiagram.md).
6dd74de6
6dd74de7# State diagrams
6dd74de8
6dd74de9> "A state diagram is a type of diagram used in computer science and related fields to describe the behavior of systems.
6dd74de10> State diagrams require that the system described is composed of a finite number of states; sometimes, this is indeed the
6dd74de11> case, while at other times this is a reasonable abstraction." Wikipedia
6dd74de12
6dd74de13Mermaid can render state diagrams. The syntax tries to be compliant with the syntax used in plantUml as this will make
6dd74de14it easier for users to share diagrams between mermaid and plantUml.
6dd74de15
6dd74de16```mermaid-example
6dd74de17---
6dd74de18title: Simple sample
6dd74de19---
6dd74de20stateDiagram-v2
6dd74de21 [*] --> Still
6dd74de22 Still --> [*]
6dd74de23
6dd74de24 Still --> Moving
6dd74de25 Moving --> Still
6dd74de26 Moving --> Crash
6dd74de27 Crash --> [*]
6dd74de28```
6dd74de29
6dd74de30```mermaid
6dd74de31---
6dd74de32title: Simple sample
6dd74de33---
6dd74de34stateDiagram-v2
6dd74de35 [*] --> Still
6dd74de36 Still --> [*]
6dd74de37
6dd74de38 Still --> Moving
6dd74de39 Moving --> Still
6dd74de40 Moving --> Crash
6dd74de41 Crash --> [*]
6dd74de42```
6dd74de43
6dd74de44Older renderer:
6dd74de45
6dd74de46```mermaid-example
6dd74de47stateDiagram
6dd74de48 [*] --> Still
6dd74de49 Still --> [*]
6dd74de50
6dd74de51 Still --> Moving
6dd74de52 Moving --> Still
6dd74de53 Moving --> Crash
6dd74de54 Crash --> [*]
6dd74de55```
6dd74de56
6dd74de57```mermaid
6dd74de58stateDiagram
6dd74de59 [*] --> Still
6dd74de60 Still --> [*]
6dd74de61
6dd74de62 Still --> Moving
6dd74de63 Moving --> Still
6dd74de64 Moving --> Crash
6dd74de65 Crash --> [*]
6dd74de66```
6dd74de67
6dd74de68In state diagrams systems are described in terms of _states_ and how one _state_ can change to another _state_ via
6dd74de69a _transition._ The example diagram above shows three states: **Still**, **Moving** and **Crash**. You start in the
6dd74de70**Still** state. From **Still** you can change to the **Moving** state. From **Moving** you can change either back to the **Still** state or to
6dd74de71the **Crash** state. There is no transition from **Still** to **Crash**. (You can't crash if you're still.)
6dd74de72
6dd74de73## States
6dd74de74
6dd74de75A state can be declared in multiple ways. The simplest way is to define a state with just an id:
6dd74de76
6dd74de77```mermaid-example
6dd74de78stateDiagram-v2
6dd74de79 stateId
6dd74de80```
6dd74de81
6dd74de82```mermaid
6dd74de83stateDiagram-v2
6dd74de84 stateId
6dd74de85```
6dd74de86
6dd74de87Another way is by using the state keyword with a description as per below:
6dd74de88
6dd74de89```mermaid-example
6dd74de90stateDiagram-v2
6dd74de91 state "This is a state description" as s2
6dd74de92```
6dd74de93
6dd74de94```mermaid
6dd74de95stateDiagram-v2
6dd74de96 state "This is a state description" as s2
6dd74de97```
6dd74de98
6dd74de99Another way to define a state with a description is to define the state id followed by a colon and the description:
6dd74de100
6dd74de101```mermaid-example
6dd74de102stateDiagram-v2
6dd74de103 s2 : This is a state description
6dd74de104```
6dd74de105
6dd74de106```mermaid
6dd74de107stateDiagram-v2
6dd74de108 s2 : This is a state description
6dd74de109```
6dd74de110
6dd74de111## Transitions
6dd74de112
6dd74de113Transitions are path/edges when one state passes into another. This is represented using text arrow, "-->".
6dd74de114
6dd74de115When you define a transition between two states and the states are not already defined, the undefined states are defined
6dd74de116with the id from the transition. You can later add descriptions to states defined this way.
6dd74de117
6dd74de118```mermaid-example
6dd74de119stateDiagram-v2
6dd74de120 s1 --> s2
6dd74de121```
6dd74de122
6dd74de123```mermaid
6dd74de124stateDiagram-v2
6dd74de125 s1 --> s2
6dd74de126```
6dd74de127
6dd74de128It is possible to add text to a transition to describe what it represents:
6dd74de129
6dd74de130```mermaid-example
6dd74de131stateDiagram-v2
6dd74de132 s1 --> s2: A transition
6dd74de133```
6dd74de134
6dd74de135```mermaid
6dd74de136stateDiagram-v2
6dd74de137 s1 --> s2: A transition
6dd74de138```
6dd74de139
6dd74de140## Start and End
6dd74de141
6dd74de142There are two special states indicating the start and stop of the diagram. These are written with the \[\*] syntax and
6dd74de143the direction of the transition to it defines it either as a start or a stop state.
6dd74de144
6dd74de145```mermaid-example
6dd74de146stateDiagram-v2
6dd74de147 [*] --> s1
6dd74de148 s1 --> [*]
6dd74de149```
6dd74de150
6dd74de151```mermaid
6dd74de152stateDiagram-v2
6dd74de153 [*] --> s1
6dd74de154 s1 --> [*]
6dd74de155```
6dd74de156
6dd74de157## Composite states
6dd74de158
6dd74de159In a real world use of state diagrams you often end up with diagrams that are multidimensional as one state can
6dd74de160have several internal states. These are called composite states in this terminology.
6dd74de161
6dd74de162In order to define a composite state you need to use the state keyword followed by an id and the body of the composite
6dd74de163state between {}. You can name a composite state on a separate line just like a simple state. See the example below:
6dd74de164
6dd74de165```mermaid-example
6dd74de166stateDiagram-v2
6dd74de167 [*] --> First
6dd74de168 state First {
6dd74de169 [*] --> second
6dd74de170 second --> [*]
6dd74de171 }
6dd74de172
6dd74de173 [*] --> NamedComposite
6dd74de174 NamedComposite: Another Composite
6dd74de175 state NamedComposite {
6dd74de176 [*] --> namedSimple
6dd74de177 namedSimple --> [*]
6dd74de178 namedSimple: Another simple
6dd74de179 }
6dd74de180```
6dd74de181
6dd74de182```mermaid
6dd74de183stateDiagram-v2
6dd74de184 [*] --> First
6dd74de185 state First {
6dd74de186 [*] --> second
6dd74de187 second --> [*]
6dd74de188 }
6dd74de189
6dd74de190 [*] --> NamedComposite
6dd74de191 NamedComposite: Another Composite
6dd74de192 state NamedComposite {
6dd74de193 [*] --> namedSimple
6dd74de194 namedSimple --> [*]
6dd74de195 namedSimple: Another simple
6dd74de196 }
6dd74de197```
6dd74de198
6dd74de199You can do this in several layers:
6dd74de200
6dd74de201```mermaid-example
6dd74de202stateDiagram-v2
6dd74de203 [*] --> First
6dd74de204
6dd74de205 state First {
6dd74de206 [*] --> Second
6dd74de207
6dd74de208 state Second {
6dd74de209 [*] --> second
6dd74de210 second --> Third
6dd74de211
6dd74de212 state Third {
6dd74de213 [*] --> third
6dd74de214 third --> [*]
6dd74de215 }
6dd74de216 }
6dd74de217 }
6dd74de218```
6dd74de219
6dd74de220```mermaid
6dd74de221stateDiagram-v2
6dd74de222 [*] --> First
6dd74de223
6dd74de224 state First {
6dd74de225 [*] --> Second
6dd74de226
6dd74de227 state Second {
6dd74de228 [*] --> second
6dd74de229 second --> Third
6dd74de230
6dd74de231 state Third {
6dd74de232 [*] --> third
6dd74de233 third --> [*]
6dd74de234 }
6dd74de235 }
6dd74de236 }
6dd74de237```
6dd74de238
6dd74de239You can also define transitions also between composite states:
6dd74de240
6dd74de241```mermaid-example
6dd74de242stateDiagram-v2
6dd74de243 [*] --> First
6dd74de244 First --> Second
6dd74de245 First --> Third
6dd74de246
6dd74de247 state First {
6dd74de248 [*] --> fir
6dd74de249 fir --> [*]
6dd74de250 }
6dd74de251 state Second {
6dd74de252 [*] --> sec
6dd74de253 sec --> [*]
6dd74de254 }
6dd74de255 state Third {
6dd74de256 [*] --> thi
6dd74de257 thi --> [*]
6dd74de258 }
6dd74de259```
6dd74de260
6dd74de261```mermaid
6dd74de262stateDiagram-v2
6dd74de263 [*] --> First
6dd74de264 First --> Second
6dd74de265 First --> Third
6dd74de266
6dd74de267 state First {
6dd74de268 [*] --> fir
6dd74de269 fir --> [*]
6dd74de270 }
6dd74de271 state Second {
6dd74de272 [*] --> sec
6dd74de273 sec --> [*]
6dd74de274 }
6dd74de275 state Third {
6dd74de276 [*] --> thi
6dd74de277 thi --> [*]
6dd74de278 }
6dd74de279```
6dd74de280
6dd74de281_You cannot define transitions between internal states belonging to different composite states_
6dd74de282
6dd74de283## Choice
6dd74de284
6dd74de285Sometimes you need to model a choice between two or more paths, you can do so using <\<choice>>.
6dd74de286
6dd74de287```mermaid-example
6dd74de288stateDiagram-v2
6dd74de289 state if_state <<choice>>
6dd74de290 [*] --> IsPositive
6dd74de291 IsPositive --> if_state
6dd74de292 if_state --> False: if n < 0
6dd74de293 if_state --> True : if n >= 0
6dd74de294```
6dd74de295
6dd74de296```mermaid
6dd74de297stateDiagram-v2
6dd74de298 state if_state <<choice>>
6dd74de299 [*] --> IsPositive
6dd74de300 IsPositive --> if_state
6dd74de301 if_state --> False: if n < 0
6dd74de302 if_state --> True : if n >= 0
6dd74de303```
6dd74de304
6dd74de305## Forks
6dd74de306
6dd74de307It is possible to specify a fork in the diagram using <\<fork>> <\<join>>.
6dd74de308
6dd74de309```mermaid-example
6dd74de310 stateDiagram-v2
6dd74de311 state fork_state <<fork>>
6dd74de312 [*] --> fork_state
6dd74de313 fork_state --> State2
6dd74de314 fork_state --> State3
6dd74de315
6dd74de316 state join_state <<join>>
6dd74de317 State2 --> join_state
6dd74de318 State3 --> join_state
6dd74de319 join_state --> State4
6dd74de320 State4 --> [*]
6dd74de321```
6dd74de322
6dd74de323```mermaid
6dd74de324 stateDiagram-v2
6dd74de325 state fork_state <<fork>>
6dd74de326 [*] --> fork_state
6dd74de327 fork_state --> State2
6dd74de328 fork_state --> State3
6dd74de329
6dd74de330 state join_state <<join>>
6dd74de331 State2 --> join_state
6dd74de332 State3 --> join_state
6dd74de333 join_state --> State4
6dd74de334 State4 --> [*]
6dd74de335```
6dd74de336
6dd74de337## Notes
6dd74de338
6dd74de339Sometimes nothing says it better than a Post-it note. That is also the case in state diagrams.
6dd74de340
6dd74de341Here you can choose to put the note to the _right of_ or to the _left of_ a node.
6dd74de342
6dd74de343```mermaid-example
6dd74de344 stateDiagram-v2
6dd74de345 State1: The state with a note
6dd74de346 note right of State1
6dd74de347 Important information! You can write
6dd74de348 notes.
6dd74de349 end note
6dd74de350 State1 --> State2
6dd74de351 note left of State2 : This is the note to the left.
6dd74de352```
6dd74de353
6dd74de354```mermaid
6dd74de355 stateDiagram-v2
6dd74de356 State1: The state with a note
6dd74de357 note right of State1
6dd74de358 Important information! You can write
6dd74de359 notes.
6dd74de360 end note
6dd74de361 State1 --> State2
6dd74de362 note left of State2 : This is the note to the left.
6dd74de363```
6dd74de364
6dd74de365## Concurrency
6dd74de366
6dd74de367As in plantUml you can specify concurrency using the -- symbol.
6dd74de368
6dd74de369```mermaid-example
6dd74de370stateDiagram-v2
6dd74de371 [*] --> Active
6dd74de372
6dd74de373 state Active {
6dd74de374 [*] --> NumLockOff
6dd74de375 NumLockOff --> NumLockOn : EvNumLockPressed
6dd74de376 NumLockOn --> NumLockOff : EvNumLockPressed
6dd74de377 --
6dd74de378 [*] --> CapsLockOff
6dd74de379 CapsLockOff --> CapsLockOn : EvCapsLockPressed
6dd74de380 CapsLockOn --> CapsLockOff : EvCapsLockPressed
6dd74de381 --
6dd74de382 [*] --> ScrollLockOff
6dd74de383 ScrollLockOff --> ScrollLockOn : EvScrollLockPressed
6dd74de384 ScrollLockOn --> ScrollLockOff : EvScrollLockPressed
6dd74de385 }
6dd74de386```
6dd74de387
6dd74de388```mermaid
6dd74de389stateDiagram-v2
6dd74de390 [*] --> Active
6dd74de391
6dd74de392 state Active {
6dd74de393 [*] --> NumLockOff
6dd74de394 NumLockOff --> NumLockOn : EvNumLockPressed
6dd74de395 NumLockOn --> NumLockOff : EvNumLockPressed
6dd74de396 --
6dd74de397 [*] --> CapsLockOff
6dd74de398 CapsLockOff --> CapsLockOn : EvCapsLockPressed
6dd74de399 CapsLockOn --> CapsLockOff : EvCapsLockPressed
6dd74de400 --
6dd74de401 [*] --> ScrollLockOff
6dd74de402 ScrollLockOff --> ScrollLockOn : EvScrollLockPressed
6dd74de403 ScrollLockOn --> ScrollLockOff : EvScrollLockPressed
6dd74de404 }
6dd74de405```
6dd74de406
6dd74de407## Setting the direction of the diagram
6dd74de408
6dd74de409With state diagrams you can use the direction statement to set the direction which the diagram will render like in this
6dd74de410example.
6dd74de411
6dd74de412```mermaid-example
6dd74de413stateDiagram
6dd74de414 direction LR
6dd74de415 [*] --> A
6dd74de416 A --> B
6dd74de417 B --> C
6dd74de418 state B {
6dd74de419 direction LR
6dd74de420 a --> b
6dd74de421 }
6dd74de422 B --> D
6dd74de423```
6dd74de424
6dd74de425```mermaid
6dd74de426stateDiagram
6dd74de427 direction LR
6dd74de428 [*] --> A
6dd74de429 A --> B
6dd74de430 B --> C
6dd74de431 state B {
6dd74de432 direction LR
6dd74de433 a --> b
6dd74de434 }
6dd74de435 B --> D
6dd74de436```
6dd74de437
6dd74de438## Comments
6dd74de439
6dd74de440Comments can be entered within a state diagram chart, which will be ignored by the parser. Comments need to be on their
6dd74de441own line, and must be prefaced with `%%` (double percent signs). Any text after the start of the comment to the next
6dd74de442newline will be treated as a comment, including any diagram syntax
6dd74de443
6dd74de444```mermaid-example
6dd74de445stateDiagram-v2
6dd74de446 [*] --> Still
6dd74de447 Still --> [*]
6dd74de448%% this is a comment
6dd74de449 Still --> Moving
6dd74de450 Moving --> Still %% another comment
6dd74de451 Moving --> Crash
6dd74de452 Crash --> [*]
6dd74de453```
6dd74de454
6dd74de455```mermaid
6dd74de456stateDiagram-v2
6dd74de457 [*] --> Still
6dd74de458 Still --> [*]
6dd74de459%% this is a comment
6dd74de460 Still --> Moving
6dd74de461 Moving --> Still %% another comment
6dd74de462 Moving --> Crash
6dd74de463 Crash --> [*]
6dd74de464```
6dd74de465
6dd74de466## Styling with classDefs
6dd74de467
6dd74de468As with other diagrams (like flowcharts), you can define a style in the diagram itself and apply that named style to a
6dd74de469state or states in the diagram.
6dd74de470
6dd74de471**These are the current limitations with state diagram classDefs:**
6dd74de472
6dd74de4731. Cannot be applied to start or end states
6dd74de4742. Cannot be applied to or within composite states
6dd74de475
6dd74de476_These are in development and will be available in a future version._
6dd74de477
6dd74de478You define a style using the `classDef` keyword, which is short for "class definition" (where "class" means something
6dd74de479like a _CSS class_)
6dd74de480followed by _a name for the style,_
6dd74de481and then one or more _property-value pairs_. Each _property-value pair_ is
6dd74de482a _[valid CSS property name](https://www.w3.org/TR/CSS/#properties)_ followed by a colon (`:`) and then a _value._
6dd74de483
6dd74de484Here is an example of a classDef with just one property-value pair:
6dd74de485
6dd74de486```txt
6dd74de487classDef movement font-style:italic;
6dd74de488```
6dd74de489
6dd74de490where
6dd74de491
6dd74de492- the _name_ of the style is `movement`
6dd74de493- the only _property_ is `font-style` and its _value_ is `italic`
6dd74de494
6dd74de495If you want to have more than one _property-value pair_ then you put a comma (`,`) between each _property-value pair._
6dd74de496
6dd74de497Here is an example with three property-value pairs:
6dd74de498
6dd74de499```txt
6dd74de500classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
6dd74de501```
6dd74de502
6dd74de503where
6dd74de504
6dd74de505- the _name_ of the style is `badBadEvent`
6dd74de506- the first _property_ is `fill` and its _value_ is `#f00`
6dd74de507- the second _property_ is `color` and its _value_ is `white`
6dd74de508- the third _property_ is `font-weight` and its _value_ is `bold`
6dd74de509- the fourth _property_ is `stroke-width` and its _value_ is `2px`
6dd74de510- the fifth _property_ is `stroke` and its _value_ is `yellow`
6dd74de511
6dd74de512### Apply classDef styles to states
6dd74de513
6dd74de514There are two ways to apply a `classDef` style to a state:
6dd74de515
6dd74de5161. use the `class` keyword to apply a classDef style to one or more states in a single statement, or
6dd74de5172. use the `:::` operator to apply a classDef style to a state as it is being used in a transition statement (e.g. with an arrow
6dd74de518 to/from another state)
6dd74de519
6dd74de520#### 1. `class` statement
6dd74de521
6dd74de522A `class` statement tells Mermaid to apply the named classDef to one or more classes. The form is:
6dd74de523
6dd74de524```txt
6dd74de525class [one or more state names, separated by commas] [name of a style defined with classDef]
6dd74de526```
6dd74de527
6dd74de528Here is an example applying the `badBadEvent` style to a state named `Crash`:
6dd74de529
6dd74de530```txt
6dd74de531class Crash badBadEvent
6dd74de532```
6dd74de533
6dd74de534Here is an example applying the `movement` style to the two states `Moving` and `Crash`:
6dd74de535
6dd74de536```txt
6dd74de537class Moving, Crash movement
6dd74de538```
6dd74de539
6dd74de540Here is a diagram that shows the examples in use. Note that the `Crash` state has two classDef styles applied: `movement`
6dd74de541and `badBadEvent`
6dd74de542
6dd74de543```mermaid-example
6dd74de544 stateDiagram
6dd74de545 direction TB
6dd74de546
6dd74de547 accTitle: This is the accessible title
6dd74de548 accDescr: This is an accessible description
6dd74de549
6dd74de550 classDef notMoving fill:white
6dd74de551 classDef movement font-style:italic
6dd74de552 classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
6dd74de553
6dd74de554 [*]--> Still
6dd74de555 Still --> [*]
6dd74de556 Still --> Moving
6dd74de557 Moving --> Still
6dd74de558 Moving --> Crash
6dd74de559 Crash --> [*]
6dd74de560
6dd74de561 class Still notMoving
6dd74de562 class Moving, Crash movement
6dd74de563 class Crash badBadEvent
6dd74de564 class end badBadEvent
6dd74de565```
6dd74de566
6dd74de567```mermaid
6dd74de568 stateDiagram
6dd74de569 direction TB
6dd74de570
6dd74de571 accTitle: This is the accessible title
6dd74de572 accDescr: This is an accessible description
6dd74de573
6dd74de574 classDef notMoving fill:white
6dd74de575 classDef movement font-style:italic
6dd74de576 classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
6dd74de577
6dd74de578 [*]--> Still
6dd74de579 Still --> [*]
6dd74de580 Still --> Moving
6dd74de581 Moving --> Still
6dd74de582 Moving --> Crash
6dd74de583 Crash --> [*]
6dd74de584
6dd74de585 class Still notMoving
6dd74de586 class Moving, Crash movement
6dd74de587 class Crash badBadEvent
6dd74de588 class end badBadEvent
6dd74de589```
6dd74de590
6dd74de591#### 2. `:::` operator to apply a style to a state
6dd74de592
6dd74de593You can apply a classDef style to a state using the `:::` (three colons) operator. The syntax is
6dd74de594
6dd74de595```txt
6dd74de596[state]:::[style name]
6dd74de597```
6dd74de598
6dd74de599You can use this in a diagram within a statement using a class. This includes the start and end states. For example:
6dd74de600
6dd74de601```mermaid-example
6dd74de602stateDiagram
6dd74de603 direction TB
6dd74de604
6dd74de605 accTitle: This is the accessible title
6dd74de606 accDescr: This is an accessible description
6dd74de607
6dd74de608 classDef notMoving fill:white
6dd74de609 classDef movement font-style:italic;
6dd74de610 classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
6dd74de611
6dd74de612 [*] --> Still:::notMoving
6dd74de613 Still --> [*]
6dd74de614 Still --> Moving:::movement
6dd74de615 Moving --> Still
6dd74de616 Moving --> Crash:::movement
6dd74de617 Crash:::badBadEvent --> [*]
6dd74de618```
6dd74de619
6dd74de620```mermaid
6dd74de621stateDiagram
6dd74de622 direction TB
6dd74de623
6dd74de624 accTitle: This is the accessible title
6dd74de625 accDescr: This is an accessible description
6dd74de626
6dd74de627 classDef notMoving fill:white
6dd74de628 classDef movement font-style:italic;
6dd74de629 classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
6dd74de630
6dd74de631 [*] --> Still:::notMoving
6dd74de632 Still --> [*]
6dd74de633 Still --> Moving:::movement
6dd74de634 Moving --> Still
6dd74de635 Moving --> Crash:::movement
6dd74de636 Crash:::badBadEvent --> [*]
6dd74de637```
6dd74de638
6dd74de639## Spaces in state names
6dd74de640
6dd74de641Spaces can be added to a state by first defining the state with an id and then referencing the id later.
6dd74de642
6dd74de643In the following example there is a state with the id **yswsii** and description **Your state with spaces in it**.
6dd74de644After it has been defined, **yswsii** is used in the diagram in the first transition (`[*] --> yswsii`)
6dd74de645and also in the transition to **YetAnotherState** (`yswsii --> YetAnotherState`).
6dd74de646(**yswsii** has been styled so that it is different from the other states.)
6dd74de647
6dd74de648```mermaid-example
6dd74de649stateDiagram
6dd74de650 classDef yourState font-style:italic,font-weight:bold,fill:white
6dd74de651
6dd74de652 yswsii: Your state with spaces in it
6dd74de653 [*] --> yswsii:::yourState
6dd74de654 [*] --> SomeOtherState
6dd74de655 SomeOtherState --> YetAnotherState
6dd74de656 yswsii --> YetAnotherState
6dd74de657 YetAnotherState --> [*]
6dd74de658```
6dd74de659
6dd74de660```mermaid
6dd74de661stateDiagram
6dd74de662 classDef yourState font-style:italic,font-weight:bold,fill:white
6dd74de663
6dd74de664 yswsii: Your state with spaces in it
6dd74de665 [*] --> yswsii:::yourState
6dd74de666 [*] --> SomeOtherState
6dd74de667 SomeOtherState --> YetAnotherState
6dd74de668 yswsii --> YetAnotherState
6dd74de669 YetAnotherState --> [*]
6dd74de670```
6dd74de671
6dd74de672<!--- cspell:ignore yswsii --->