State diagram

State diagrams show every state a system can be in and the events that move it between them — useful for anything with a lifecycle: a connection, an order, a UI component. zombie-mermaid supports nested composite states, start/end pseudostates, and animated edge transitions.

Source → render

A connection's full lifecycle, state by state.

connection.mmd
stateDiagram-v2
  [*] --> Idle
  Idle --> Active : start
  Active --> Idle : cancel
  Active --> Done : complete
  Done --> [*]
State diagram diagram, zombie-mermaid start cancel complete Idle Active Done
More examples

More real-world examples.

Keep exploring

Explore the other diagram types.

Pick a look

Live in every built-in theme.