Learn Mermaid Syntax
Browse our code recipes and tutorials. Copy sample templates or load them directly into your project workspaces.
Flowchart Basics & Node Shapes
Learn how to construct flowcharts with decision forks and custom node boundaries. Flowcharts start with "flowchart TD" (top-down) or "flowchart LR" (left-right).
flowchart TD
A[Start] --> B{Decision}
B -->|Yes| C[Success]
B -->|No| D[End]Sequence Actor Timelines
Understand communication flows between distinct lifelines. Uses actor columns, solid arrow messages (->>), dashed responses (-->>), and conditional alt/else blocks.
sequenceDiagram
autonumber
Alice->>Bob: Hello Bob, how are you?
alt is good
Bob-->>Alice: I am good thanks!
else is bad
Bob-->>Alice: Not so good
endEntity Relationship Schemas
Map out database tables, attributes, and relationships. Learn cardinality symbols like "||--o{" to denote one-to-many associations.
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
CUSTOMER }|..|{ DELIVERY-ADDRESS : usesObject-Oriented Class Structures
Model classes, variables, and methods. Displays class properties, inheritance arrows (<|--), and interface implementations.
classDiagram
class Animal {
+String name
+isMammal() bool
}
class Duck {
+String swimSpeed
+quack()
}
Animal <|-- DuckState Transition Machines
Track entity life cycles. Define initial states ([*]), transitions with trigger actions (-->), and terminal states.
stateDiagram-v2 [*] --> Idle Idle --> Moving : Action Moving --> Idle : Stop Moving --> [*] : Shutdown
Mindmap Concept Organization
Organize ideas hierarchically starting from a root node. Ideal for brainmaps, feature lists, and architectural stack structures.
mindmap
root((Mermaid Studio))
Features
Live Render
Multiple Themes
High-Res Export
Stack
Next.js
Zustand
Tailwind