Mermaid Mindmap Syntax & Examples
Reference for Mermaid mindmap syntax — root nodes, indentation-based hierarchy, node shapes, icons, and markdown labels. Copy-paste examples for workshops & brainstorming.
Use this page to connect a high-intent search query to the right problem-solution narrative.
A syntax reference for Mermaid's `mindmap` grammar — read this when you need to know how indentation maps to hierarchy, how to pick a root shape, or how to add icons, then try the result in the editor.
View Mermaid sourcePlain-text diagram syntax — copy or edit directly.
1mindmap2 root((Beauty Diagram launch))3 Positioning4 Mermaid-first5 Presentation-ready output6 Users7 Engineers8 Designers9 Product managers10 Channels11 Docs mentions12 Dev communities13 Integration partnersWhat is a Mermaid mindmap
A Mermaid mindmap is a radial tree diagram with a strong central node and branches that fan outward in increasing levels of detail. The mindmap diagram type was introduced as experimental in Mermaid v9.4 and is still officially marked experimental in current releases — but the basic grammar has been stable for over a year and is safe to use in production documentation. Mindmaps are right when the structure is hierarchical and non-sequential: workshop brainstorms, product feature breakdowns, taxonomy explorations, kickoff agendas. If the content has an inherent order, use a flowchart or timeline instead.
Root node — declaration and shape
Every mindmap starts with the `mindmap` keyword followed by the root node declaration. The root sits at the centre of the rendered diagram, so its shape carries visual weight. `root((Label))` renders as a circle (the most common choice). `root[Label]` renders as a rectangle. `root(Label)` renders as a rounded rectangle. `root))Label((` renders as a cloud. `root)Label(` renders as a hexagon. Choose by visual emphasis — a circle reads as the primary subject, a cloud reads as a more loose / brainstormy theme.
- `root((Label))` — circle (default, strongest emphasis)
- `root[Label]` — rectangle (formal subject)
- `root))Label((` — cloud (workshop / brainstorm tone)
- `root)Label(` — hexagon (decision / pivot point)
Hierarchy via indentation
Mindmap structure is encoded entirely through indentation — there are no curly braces, dashes, or bullets. A line indented further than the previous line is a child of that previous line. A line at the same indentation level is a sibling. Each indentation level renders one more ring outward from the root. Mermaid is lenient about how much you indent (two or four spaces both work) but the indentation must be consistent within a diagram. Inconsistent indentation is the single most common reason a mindmap doesn't render the structure you expected.
Node shapes — beyond the default
Each non-root node can take the same shape modifiers as the root. `Branch[Rectangle]`, `Branch(Round)`, `Branch((Circle))`, `Branch))Cloud((`, `Branch)Hexagon(`, `Branch{{Squiggly}}` are all valid. Plain text without brackets renders as a default rounded node. Use shapes deliberately — varied shapes signal different categories (decisions vs facts vs questions). Most clean mindmaps stick to one or two shapes and reserve the unusual ones (cloud, hexagon) for emphasis.
- `Plain text` — default rounded node
- `Label[Square]` — rectangle (formal sub-topic)
- `Label((Circle))` — circle (key concept)
- `Label{{Squiggly}}` — bang shape (callout)
Icons & markdown labels
Mindmap nodes can carry icons and markdown formatting. Icons use the `::icon(name)` syntax appended after the node: `Marketing ::icon(fa fa-bullhorn)` adds a Font Awesome bullhorn icon to the Marketing node. Markdown labels use the backtick form: ``Title `with **bold** text` ``. Both features are useful when the mindmap will be presented (workshop summary, planning overview) rather than just sketched. Avoid overusing icons — one or two per branch reads as deliberate; one per node reads as cluttered.
Common patterns & gotchas
Three patterns cover most real mindmaps. Topic breakdowns use a strong-root + balanced branches structure — workshop summaries usually look like this. Decision trees use a root with each branch leading to a separate outcome (use sparingly; flowchart is usually better for actual decisions). Stakeholder maps put the project at the root with branches per stakeholder group and sub-branches per concern. The most common gotcha: mixing tabs and spaces in indentation breaks the parser silently. Stick to spaces consistently. Second gotcha: very deeply nested branches (5+ levels) become unreadable — split into multiple mindmaps if depth grows past 4.
- Mixed tabs/spaces in indentation breaks parsing — pick one and stick to it
- More than 4 levels deep reads as cluttered — split into multiple mindmaps
- Indentation must be consistent within a single diagram