← Back to Editor All Tutorials
中文

How to Draw Mindmaps in Mermaid

Mindmaps organize thoughts, visualize information architecture, and help understand relationships between complex concepts. They are ideal for brainstorming, project planning, and knowledge management. Mermaid uses mindmap keyword for mindmaps.

Declaring a Chart

Use mindmap keyword:

mindmap
    root((Central Theme))

在 MermZen 中试试 →

Basic Structure

Create mindmap with main nodes and subnodes:

mindmap
    root((Project Management))
        Planning
            Requirements Analysis
            Task Decomposition
            Time Scheduling
        Execution
            Team Collaboration
            Progress Tracking
            Problem Solving
        Control
            Quality Control
            Risk Assessment
            Change Management
        Closing
            Project Acceptance
            Lessons Learned
            Documentation

在 MermZen 中试试 →

Hierarchy Structure

Supports multi-level nodes and nested structures:

mindmap
    root((Software Development))
        Frontend Development
            HTML
                Semantic Tags
                Structure Optimization
            CSS
                Responsive Design
                Flex/Grid
            JavaScript
                ES6+
                DOM Manipulation
        Backend Development
            Node.js
                Express
                Koa
            Python
                Django
                Flask
            Database
                SQL
                NoSQL
        Testing
            Unit Testing
            Integration Testing
            Automation Testing

在 MermZen 中试试 →

Full Example: Project Management Mindmap

mindmap
    root((Project Management Mindmap))
        Project Initiation
            Define Objectives
                SMART Principles
                Success Criteria
            Stakeholders
                Identification
                Communication Plan
            Charter
                Project Scope
                Constraints
        Project Planning
            Requirements Analysis
                User Requirements
                Functional Requirements
            Task Breakdown
                WBS
                Dependencies
            Time Management
                Gantt Charts
                Critical Path
            Resource Planning
                Human Resources
                Budget
        Project Execution
            Team Management
                Role Assignment
                Collaboration Tools
            Communication Management
                Meetings
                Reports
            Quality Assurance
                Standards
                Inspections
        Project Monitoring
            Progress Control
                Variance Analysis
                Adjustments
            Risk Management
                Identification
                Assessment
                Response
            Change Management
                Requests
                Approval
        Project Closing
            Acceptance
                User Acceptance
                Final Delivery
            Evaluation
                Performance
                Lessons Learned
            Documentation
                Archives
                Knowledge

在 MermZen 中试试 →

Why Use Mindmaps?

Mindmaps are powerful visualization tools suitable for various scenarios:

Comparison with Other Diagrams

Diagram Type Characteristics Use Cases
Mindmap Emphasizes hierarchy, free expansion Brainstorming, knowledge organization, project planning
Flowchart Emphasizes process sequence, clear direction Business processes, algorithm logic, decision trees
Tree Diagram Strict hierarchy, single parent node Organizational structure, file directories, classification systems
Org Chart Fixed structure, clear roles Company structure, team division, reporting relationships

Key Differences:

Best Practices

Structure Guidelines

Visual Guidelines

Content Guidelines

Common Mistakes

Structural Issues

Mistake Problem Suggestion
Too deep More than 5 levels, hard to read Keep within 3-5 levels
Too many branches More than 7 main branches Merge related branches
Nodes too long Description over 15 characters Extract keywords

Content Issues

Mistake Problem Suggestion
Information overload Putting everything on the map Filter core information
Disorganized hierarchy Same-level nodes don't belong together Re-categorize
Lack of focus All branches have equal weight Highlight core branches

Quick Reference

Syntax Function
mindmap Declare mindmap
root((Central Theme)) Root node (central theme)
Subnode First-level subnode
Sub-subnode Second-level subnode (indented)
Sub-sub-subnode Higher-level subnodes
%% comment Line comment

Next Step

After mastering mindmaps, continue exploring other Mermaid diagram types based on your needs.


To try the above code in MermZen, click Open Editor and paste the code there.