Skip to content
diagrams.mbt
DocsArticlesGalleryAPIGitHub

Gallery / state

Mermaid composite and choice

Family: state. Status: Implemented.

Mermaid 12.2.0 state source with typed hierarchy and labelled transitions.

Scope: Structural illustration and supplied scenarios only. Guards and actions remain text. History is descriptive and is never restored by execution.

Preview

Mermaid composite and choice preview
Mermaid composite and choice preview (dark)

Source

state-mermaid-choice.mmd

text/plain

stateDiagram-v2
    [*] --> Review
    state Review {
        [*] --> Draft
        Draft --> Decision : submit
        state Decision <<choice>>
        Decision --> Approved : accepted
        Decision --> Draft : revise
        Approved --> [*]
    }
    Review --> Published : publish
    Published --> [*]

Download source: state-mermaid-choice.mmd

Download SVG Download dark SVG Open offline player

diagrams.mbt · Diagramming for MoonBit.