Cheatsheet: MermaidJS
Flowchart
Direction - top down

Direction - left to right

Shape: round rect

Shape: circle

Shape: cylinder/database

Shape: rhombus

Shape: double circle

Edges: with arrow head
Edges: without arrow
Edges: with text
Subgraphs/clusters
Style node
Assign class to node
Assign class to node inline
Theme and init
Set theme and options inline
Security level for interactive links
Sequence diagram
Line types

Activate/deactivate
Activate/deactivate inline
Participants
Parallel blocks
Class diagram
Define class with fields and methods
ER diagram
Basic ER relationship
State diagram
Simple state machine
Pie diagram
Pie chart with values
Gantt diagram
Basic project timeline
Git graph
Branch and merge history
Common pitfalls
Use flowchart instead of graph for newer syntax
Prefer IDs without spaces; use labels for readable text