State diagram demos

Very simple showing change from State1 to State2

		stateDiagram
		  accTitle: This is the accessible title
      accDescr:This is an accessible description
      State1 --> State2
    

This has classDef statements to apply style classes to specific states

Here are the classDef statements:

classDef notMoving fill:white
classDef movement font-style:italic;
classDef badBadEvent fill:#f00,color:white,font-weight:bold

And these are how they are applied:

class Still notMoving
class Moving, Crash movement
class Crash badBadEvent

		stateDiagram-v2
		  accTitle: This is the accessible title
      accDescr: This is an accessible description

      classDef notMoving fill:white
      classDef movement font-style:italic;
      classDef badBadEvent fill:#f00,color:white,font-weight:bold

      [*] --> Still
      Still --> [*]
      Still --> Moving
      Moving --> Still
      Moving --> Crash
      Crash --> [*]

      class Still notMoving
      class Moving, Crash movement
      class Crash badBadEvent

    

    stateDiagram
      accTitle: very very simple state
    accDescr: This is a state diagram showing one state
    State1
    

This shows Composite states



    stateDiagram-v2
    [*] --> First
    First --> Second
    First --> Third

    state First {
        [*] --> 1st
        1st --> [*]
    }
    state Second {
        [*] --> 2nd
        2nd --> [*]
    }
    state Third {
        [*] --> 3rd
        3rd --> [*]
    }


    
    stateDiagram
    State1: The state with a note
    note right of State1
    Important information! You can write
    notes.
    end note
    State1 --> State2
    note left of State2 : This is the note to the left.
    
    stateDiagram
    State1
    note right of State1
    Line1
Line2
Line3
Line4
Line5 end note