Every Mermaid diagram type the macro renders, with the source behind each one.
Twenty-one diagram types, each rendered here by the same library the macro runs in Confluence. Every panel has a Show source button: what you read there is exactly what goes inside a fenced mermaid block on the page.
Note
Every example on this page is lifted from a real Confluence space that documents the app itself, which is why they are about export jobs and Forge runtimes rather than about cats. Each one is short on purpose: a ten-line diagram is read, a hundred-line one is scrolled past.
Flow and structure
flowchart
The one you will use most. Nodes, edges, subgraphs, and classDef for colour the author controls.
```mermaid · flowchartExample
Rendering diagram…
sequenceDiagram
Participants over time, with alt, loop and autonumber.
```mermaid · sequenceDiagramExample
Rendering diagram…
stateDiagram-v2
States, transitions and choice pseudo-states.
```mermaid · stateDiagram-v2Example
Rendering diagram…
classDiagram
Classes, generics, stereotypes and relationships.
```mermaid · classDiagramExample
Rendering diagram…
erDiagram
Entities, cardinality and attributes with comments.
```mermaid · erDiagramExample
Rendering diagram…
C4Context
The C4 model's first level: people, systems, and the boundary around them.
```mermaid · C4ContextExample
Rendering diagram…
block-beta
A grid of blocks, for a layered picture that a flowchart would arrange badly.
```mermaid · block-betaExample
Rendering diagram…
architecture-beta
Services and groups, with edges that attach to a named side of each box.
```mermaid · architecture-betaExample
Rendering diagram…
mindmap
Indentation is the whole syntax. Good for a feature map nobody wants to lay out by hand.
```mermaid · mindmapExample
Rendering diagram…
requirementDiagram
Requirements, their risk and verification method, and what satisfies them.
```mermaid · requirementDiagramExample
Rendering diagram…
packet-beta
Bit ranges in a binary layout. Niche, and exactly right when you need it.
```mermaid · packet-betaExample
Rendering diagram…
Plans and time
gantt
Dates, dependencies (after), and task states. Wide by nature — this is the type the Width setting exists for.
```mermaid · ganttExample
Rendering diagram…
timeline
Periods and the events inside them. No dates to get wrong.
```mermaid · timelineExample
Rendering diagram…
journey
Steps scored 1–5 by who lives them. The low scores are the point.
```mermaid · journeyExample
Rendering diagram…
kanban
Columns, cards, and per-card metadata such as priority and assignee.
```mermaid · kanbanExample
Rendering diagram…
Numbers
pie
One line per slice. showData prints the values.
```mermaid · pieExample
Rendering diagram…
xychart-beta
Bars and lines on the same axes.
```mermaid · xychart-betaExample
Rendering diagram…
sankey-beta
Flows and where they go. Three comma-separated columns: from, to, value.
```mermaid · sankey-betaExample
Rendering diagram…
radar-beta
Several things scored on the same axes, overlaid.
```mermaid · radar-betaExample
Rendering diagram…
treemap-beta
Nested proportions. Here, lines of code per module.
```mermaid · treemap-betaExample
Rendering diagram…
quadrantChart
Two axes, four named quadrants, points placed by coordinate.
```mermaid · quadrantChartExample
Rendering diagram…
If a diagram does not appear
Check the fence says exactly mermaid, then switch the macro to Preview — Mermaid reports its own syntax errors there, with the line number. A diagram type Mermaid does not know reports itself the same way.