Mind map
About mind maps
A mind map is a radial diagram that organizes ideas around a central topic, branching outward into subtopics and details. Tony Buzan popularized the format in the 1970s as a note-taking and brainstorming tool; the method has since been adopted widely in education, project planning, meeting facilitation, and knowledge management. The key insight is that non-linear branching mirrors how associative thinking works — faster than outlining, more structured than free-writing.
Schematex mind maps use a Markdown-heading + bullet-list DSL inspired by markmap — a format most people already know. Two layout styles are available: the classic radial map (branches in all directions) and a logic-right horizontal tree. This page documents what the parser accepts today.
1. Your first mind map
The smallest useful mind map: a central topic with two branches, one with a sub-item.
Four rules cover 80% of usage:
- Start with an optional
mindmapkeyword on its own line, then a blank line. - The root is the single
#heading — exactly one is allowed. - Use
##,###, and deeper headings to set branch depth. Heading level equals tree depth. - Use
-,*, or+bullets to add sub-items under any heading. Each 2-space indent adds one more depth level.
Comments are not supported. Use
%%directives (before the#root) for configuration only.
2. Headings and depth
Heading level maps directly to tree depth. # is always the root (depth 0). ## is depth 1. ### is depth 2, and so on up to ###### (depth 5).
mindmap
# Root
## Branch A ← depth 1
### Sub-branch ← depth 2
#### Leaf ← depth 3
## Branch BHeadings can jump levels — #### after ## is valid and produces a node at depth 3. The tree depth is relative to the root, not to the previous heading.
3. Bullets
Bullets extend a heading branch with further detail. Any of -, *, or + is accepted as the bullet marker. Each 2 spaces of indentation adds one level of depth relative to the enclosing heading.
## Risks
- Technical complexity ← depth 2 (one level under ## Risks)
- Legacy integrations ← depth 3 (2 spaces indent)
- Auth service ← depth 4 (4 spaces indent)
- Team availability ← depth 2 again4. Inline formatting
Node labels support a subset of Markdown inline formatting. The parser tokenizes labels at parse time; the renderer uses the tokens to emit styled text.
| Syntax | Effect | Example |
|---|---|---|
**text** | Bold | **Critical path** |
*text* | Italic | *optional* |
`code` | Monospace code | `npm install` |
[text](url) | Link | [RFC 7519](https://tools.ietf.org/html/rfc7519) |
[ ] item | Unchecked task | [ ] Write tests |
[x] item | Checked task | [x] Design review |
The checkbox must be at the very start of the label (before any other text). Inline formatting can be nested: **[bold link](url)**.
5. Layout styles
The %% style: directive selects the layout algorithm. Place it before the # root heading.
| Style | Layout | Best for |
|---|---|---|
map (default) | Radial — branches spread in all directions from the center | Brainstorming, concept maps, free-form exploration |
logic-right | Horizontal tree — all branches extend to the right | Structured outlines, hierarchies, sequential breakdowns |
futureswheel | Concentric rings — the root at the hub, each heading level on its own ring | Foresight, consequence mapping, structured brainstorming |
driver | Horizontal tree — aim on the left flowing right through drivers to change ideas | Improvement programs, aim → driver → action breakdowns |
%% style: map
%% style: logic-right
%% style: futureswheel
%% style: drivermap (default) — radial layout, branches spread in all directions from the center. Best for brainstorming and concept maps.
logic-right — horizontal tree, all branches extend to the right. Best for structured outlines and sequential hierarchies.
futureswheel — a Futures Wheel (Jerome Glenn, 1971/72), the classic structured-brainstorming format for thinking through consequences. The central event or trend sits at the hub; first-order consequences land on the inner ring, second-order consequences on the next ring out, and so on. Each child stays inside the angular sector of its parent, and every ring is color-coded by order, so a reader can see at a glance how far a ripple is from the original event. Depth maps to rings: # is the hub, ## is the first ring (1st-order), ### / bullets under a heading push out to the next ring (2nd-order), and deeper levels keep stepping outward.
driver — a Driver Diagram, the planning tool from the IHI (Institute for Healthcare Improvement) model for improvement. It reads left to right as a tidy tree: the aim on the far left, the primary drivers (the few high-leverage areas that move the aim) in the next column, then secondary drivers and concrete change ideas branching further right. Tree levels map cleanly to the structure: # is the aim, ## are primary drivers, and bullets / deeper headings under each become the secondary drivers and change ideas. Use it whenever you need to show how a goal will actually be reached.
6. Directives
Directives are %% lines placed before the # root heading. They configure the diagram globally.
| Directive | Values | Default | Effect |
|---|---|---|---|
%% style: … | map, logic-right, futureswheel, driver | map | Layout algorithm |
%% theme: … | any string | (none) | Theme override passed to renderer |
%% maxLabelWidth: … | integer 80–1000 | 240 | Max pixel width before label wraps |
mindmap
%% style: logic-right
%% maxLabelWidth: 320
# Wide label root7. Labels & comments
- Root title: the text after
#on the root heading line. - Branch labels: the text after
##,###, etc. - Bullet labels: the text after the
-/*/+marker. - Inline formatting:
**bold**,*italic*,`code`,[text](url),[ ]/[x]. - Comments: not supported in the body. Use
%%directives before the#root for configuration;%%lines in the body are treated as directives (silently ignored if unrecognized).
8. Reserved words & escaping
Reserved at document start: mindmap (optional keyword) and %% (directive prefix).
Reserved as root: exactly one # heading; a second # heading throws a parse error.
Bullet markers: -, *, + followed by a space. A * that is not followed by a space is treated as an italic marker if it appears inside label text.
Inline conflicts: a label beginning with [ ] or [x] is parsed as a checkbox, not a Markdown link. If you need a label that literally starts with [, write \[ — the backslash escapes the bracket.
9. Common mistakes
| You wrote | Parser says | Fix |
|---|---|---|
Two # headings | Error: multiple # center nodes not allowed | Use exactly one # heading as the root |
##Branch (no space after ##) | Line is not recognized as a heading; silently skipped | Always put a space: ## Branch |
| Bullet indented 3 spaces | Depth = lastHeadingDepth + 1 + floor(3/2) = lastHeadingDepth + 2 — may create an unexpected level | Use multiples of 2 spaces: 0, 2, 4, 6… |
%% style: radial | Unknown value silently ignored; layout stays map | Use map, logic-right, futureswheel, or driver |
mindmap keyword mid-document | Treated as a plain text line (the keyword is only recognized on the very first line) | Place mindmap on line 1, before any content |
[ ]text (no space after bracket) | Checkbox not recognized; rendered as literal [ ]text | [ ] text — space required after the closing bracket |
10. Grammar (EBNF)
document = ("mindmap" NEWLINE)? (blank | directive)* node*
directive = "%%" WS key ":" WS value NEWLINE
key = "style" | "theme" | "maxlabelwidth"
node = heading | bullet
heading = INDENT? "#"+ SPACE label NEWLINE
bullet = SPACE* bullet-marker SPACE label NEWLINE
bullet-marker = "-" | "*" | "+"
label = inline-token*
inline-token = checkbox
| "**" inline-token* "**"
| "*" inline-token* "*"
| "`" code-text "`"
| "[" inline-token* "]" "(" url ")"
| plain-text
checkbox = "[ ]" SPACE | "[x]" SPACE | "[X]" SPACE
INDENT = WS* %% headings may have leading whitespace (ignored)
SPACE = " " | "\t"Depth rules:
- Heading
#→ depth 0 (root) - Heading
##→ depth 1,###→ depth 2, etc. - Bullet at
nleading spaces → depth =lastHeadingDepth + 1 + floor(n / 2)
Authoritative source: src/diagrams/mindmap/parser.ts. If this diverges from the parser, the parser wins — please open an issue.
11. Roadmap
Planned — not yet parseable. Do not use these in generated DSL today; the parser will reject or ignore them.
%%{init: {…}}%%block — Mermaid-style init block for theme/config; currently only%%line directives are supported.- Auto-numbered branches —
%% numbering: trueto prefix each branch with 1., 1.1., etc. - Callout / note nodes — a special marker to attach a floating annotation box to any node.
- Image nodes —
as an entire node label rendered as an inline image. - Collapsed branches —
%% collapsed: branchIdto render a subtree as a single folded indicator.
Track in the GitHub issues if you need any of these sooner.
Related examples
Ready-to-use scenarios from the examples gallery:
Interactive editing
Every authored node label is an exact source edit target. Hierarchy determines automatic tree layout, so persistent node drag stays disabled rather than writing unstable presentation coordinates.
Found this useful?
Schematex is free, fully open source, and zero-dependency. A star helps other developers discover it.