Mermaid diagram types
Mermaid supports 22 kinds of diagrams, from flowcharts and sequence diagrams to Gantt charts, mindmaps and architecture diagrams. Pick one to see its syntax, live examples and best practices.
Process
Software
Sequence Diagram
Show how services, users and systems exchange messages over time.
Syntax & examplesClass Diagram
Model object-oriented code: classes, members and relationships (UML).
Syntax & examplesState Diagram
Describe state machines: states, transitions, choices and nested states.
Syntax & examplesGit Graph
Visualise Git branches, commits, merges and release tags.
Syntax & examplesRequirement Diagram
Trace requirements to the elements that satisfy and verify them (SysML).
Syntax & examplesC4 Diagram
Document software architecture using the C4 model (context, containers…).
Syntax & examplesBlock Diagram
Lay out system components in a grid you control, with spans and nesting.
Syntax & examplesPacket Diagram
Visualise network packets and binary formats bit by bit.
Syntax & examplesArchitecture Diagrambeta
Draw cloud and infrastructure diagrams with services, groups and icons.
Syntax & examplesData
Planning
Gantt Chart
Plan projects with tasks, durations, dependencies and milestones.
Syntax & examplesTimeline
Show events in chronological order, grouped by period or section.
Syntax & examplesUser Journey
Map user experiences step by step with satisfaction scores.
Syntax & examplesKanban Board
Show work items as cards in columns such as To do, Doing and Done.
Syntax & examplesCharts
Pie Chart
Show proportions of a whole with a simple labelled pie chart.
Syntax & examplesQuadrant Chart
Plot items on a 2×2 matrix for prioritisation and positioning.
Syntax & examplesSankey Diagram
Show how quantities flow between categories with weighted links.
Syntax & examplesXY Chart (Bar & Line)
Bar and line charts with categorical or numeric axes.
Syntax & examplesRadar Chartbeta
Compare items across several dimensions on a spider chart.
Syntax & examplesTreemapbeta
Show hierarchical data as nested rectangles sized by value.
Syntax & examples