Example mind map code
This is the Mermaid source loaded in the editor above. Copy it into a Markdown file inside a ```mermaid block and GitHub, GitLab, Notion or Obsidian will render it.
mindmap
root((Product Launch))
Marketing
Blog post
Social media
Newsletter
Engineering
Feature freeze
Load testing
Release notes
Support
FAQ update
Team training
Sales
Pricing page
Demo scriptMind map syntax cheat sheet
| Syntax | What it does |
|---|---|
| mindmap | Start a mind map. |
| Indentation | Hierarchy comes from indentation: a deeper line is a child of the line above it. |
| root((Text)) | Circle node. Other shapes: [square], (rounded), ))bang((, )cloud(, {{hexagon}}. |
| Plain text | A node with the default shape. |
| ::icon(fa fa-book) | Add an icon to the node above (needs the icon font on the page). |
How to make a Mermaid mind map
- 1Start the code with mindmap.
- 2Write the central idea on the next line, for example root((Launch plan)).
- 3Indent child ideas beneath their parent, one per line.
- 4Change node shapes with brackets where you want emphasis.
- 5Export as SVG or PNG, or copy a share link.
Indentation is the structure
A Mermaid mindmap has no arrows. Each line is a node, and its indentation relative to the line above decides its parent, just like a bulleted outline.
Use consistent indentation, such as two or four spaces per level. Uneven indentation is the most common reason a node attaches to the wrong parent.
Node shapes
Plain text gives the default shape. id[Text] is a square, id(Text) rounded, id((Text)) a circle, id))Text(( a bang, id)Text( a cloud and id{{Text}} a hexagon.
Use one distinctive shape for the root and plain nodes elsewhere so the centre stands out.
From outline to map
Because the source is an outline, you can paste notes from a document, indent them, and get a map in seconds. That makes mind maps useful for brainstorming, study notes and planning.
Keep each node to a few words; long sentences make branches crowd each other.