mermaid
Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.
Last updated a day ago by knsv .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install mermaid 
SYNC missed versions from official npm registry.

mermaid Build Status NPM Coverage Status Join our Slack! This project is using Percy.io for visual regression testing.

banner Edit this Page N|Solid

:trophy: Mermaid was nominated and won the JS Open Source Awards (2019) in the category "The most exciting use of technology"!!! Thanks to all involved, people committing pull requests, people answering questions and special thanks to Tyler Long who is helping me maintain the project.

mermaid is a Javascript based diagramming and charting tool that uses markdown-inspired text definitions and a renderer to create and modify complex diagrams. The main purpose of mermaid is to help Documentation catch up with Development.

Doc-Rot is a Catch-22 that Mermaid helps to solve.

Diagramming and Documentation costs precious developer time and gets outdated quickly.

But not having diagrams or Docs ruins productivity and hurts organizational learning.

mermaid addresses this problem by cutting the time, effort and tooling that is required to create modifiable diagrams and charts, for smarter and more reusable content.**

The text definitions for mermaid diagrams allows for it to be updated easily, it can also be made part of production scripts (and other pieces of code). So less time needs be spent on documenting, as a separate and laborious task.

Even non-programmers can create diagrams through the Mermaid Live Editor.

mermaid Overview has video tutorials.

Use mermaid with your favorite applications, check out the list of Integrations and Usages of Mermaid**

For a more detailed introduction to mermaid and some of it's more basic uses, look to the Beginner's Guide and Usage.

CDN

Documentation

Contribution

Record of Mermaid Version Changes.

Version News: 8.7.0 Released with Updates to Theme Configuration

Version 8.7.0 Mermaid comes out with a System for Dynamic and Integrated Diagram Theme Configuration.

Mermaid comes out with New Configuration Protocols in Version 8.6.0

New diagrams in 8.4

With version 8.4 class diagrams have got some new features, bug fixes and documentation. Another new feature in 8.4 is the new diagram type, state diagrams.

Image show the two new diagram types

Special note regarding version 8.2

In version 8.2 a security improvement was introduced. A securityLevel configuration was introduced which sets the level of trust to be used on the parsed diagrams.

  • true: (default) tags in text are encoded, click functionality is disabled
  • false: tags in text are allowed, click functionality is enabled

Closed issues:

⚠️ Note : This changes the default behaviour of mermaid so that after upgrade to 8.2, if the securityLevel is not configured, tags in flowcharts are encoded as tags and clicking is prohibited.

If your application is taking resposibility for the diagram source security you can set the securityLevel accordingly. By doing this clicks and tags are again allowed.

mermaidAPI.initialize({
    securityLevel: 'loose'
});

The following are some examples of the diagrams, charts and graphs that can be made using mermaid and the Markdown-inspired text specific to it. Click here jump into the text syntax.

Flow
[docs - live editor]
graph TD
A[Hard] -->|Text| B(Round)
B --> C{Decision}
C -->|One| D[Result 1]
C -->|Two| E[Result 2]
    
Sequence
[docs - live editor]
sequenceDiagram
Alice->>John: Hello John, how are you?
loop Healthcheck
    John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
    
Gantt
[docs - live editor]
gantt
section Section
Completed :done,    des1, 2014-01-06,2014-01-08
Active        :active,  des2, 2014-01-07, 3d
Parallel 1   :         des3, after des1, 1d
Parallel 2   :         des4, after des1, 1d
Parallel 3   :         des5, after des3, 1d
Parallel 4   :         des6, after des4, 1d
    
Class
[docs - live editor]
classDiagram
Class01 <|-- AveryLongClass : Cool
<<interface>> Class01
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
class Class10 {
  <<service>>
  int id
  size()
}
State
[docs - live editor]
stateDiagram
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
Pie
[docs - live editor]
pie
"Dogs" : 386
"Cats" : 85
"Rats" : 15
Git
[experimental - live editor]
Coming soon!
User Journey
[docs - live editor]
  journey
    title My working day
    section Go to work
      Make tea: 5: Me
      Go upstairs: 3: Me
      Do work: 1: Me, Cat
    section Go home
      Go downstairs: 5: Me
      Sit down: 3: Me
User Journey Diagram

Related projects

Contributors Help wanted Contributors Commits

Mermaid is a growing community and is always accepting new contributors. There's a lot of different ways to help out and we're always looking for extra hands! Look at this issue if you want to know where to start helping out.

Detailed information about how to contribute can be found in the contribution guide

Appreciation

A quick note from Knut Sveidqvist:

Many thanks to the d3 and dagre-d3 projects for providing the graphical layout and drawing libraries! Thanks also to the js-sequence-diagram project for usage of the grammar for the sequence diagrams. Thanks to Jessica Peter for inspiration and starting point for gantt rendering. Thank you to Tyler Long who has been a collaborator since April 2017.

Thank you to the ever-growing list of contributors that brought the project this far!


Mermaid was created by Knut Sveidqvist for easier documentation.

Current Tags

  • 8.7.0                                ...           latest (a day ago)
  • 8.0.0-alpha.2                                ...           next (2 years ago)

97 Versions

  • 8.7.0                                ...           a day ago
  • 8.6.4                                ...           15 days ago
  • 8.6.3                                ...           17 days ago
  • 8.6.2                                ...           19 days ago
  • 8.6.1                                ...           19 days ago
  • 8.6.0                                ...           a month ago
  • 8.5.2                                ...           2 months ago
  • 8.5.1                                ...           3 months ago
  • 8.5.0                                ...           4 months ago
  • 8.4.8                                ...           6 months ago
  • 8.4.7                                ...           6 months ago
  • 8.4.6                                ...           7 months ago
  • 8.4.5                                ...           7 months ago
  • 8.4.4                                ...           8 months ago
  • 8.4.3                                ...           8 months ago
  • 8.4.2                                ...           9 months ago
  • 8.4.1                                ...           9 months ago
  • 8.4.0                                ...           10 months ago
  • 8.3.1                                ...           a year ago
  • 8.3.0                                ...           a year ago
  • 8.2.6                                ...           a year ago
  • 8.2.5                                ...           a year ago
  • 8.2.4                                ...           a year ago
  • 8.2.3                                ...           a year ago
  • 8.2.2                                ...           a year ago
  • 8.2.1                                ...           a year ago
  • 8.1.0                                ...           a year ago
  • 8.0.0                                ...           2 years ago
  • 8.0.0-rc.8                                ...           2 years ago
  • 8.0.0-rc.7                                ...           2 years ago
  • 8.0.0-rc.6                                ...           2 years ago
  • 8.0.0-rc.5                                ...           2 years ago
  • 8.0.0-rc.4                                ...           2 years ago
  • 8.0.0-rc.3                                ...           2 years ago
  • 8.0.0-rc.2                                ...           2 years ago
  • 8.0.0-rc.1                                ...           2 years ago
  • 8.0.0-beta.9                                ...           2 years ago
  • 8.0.0-beta.8                                ...           2 years ago
  • 8.0.0-beta.7                                ...           2 years ago
  • 8.0.0-beta.6                                ...           2 years ago
  • 8.0.0-beta.5                                ...           2 years ago
  • 8.0.0-beta.4                                ...           2 years ago
  • 8.0.0-beta.3                                ...           2 years ago
  • 8.0.0-beta.2                                ...           2 years ago
  • 8.0.0-beta.1                                ...           2 years ago
  • 8.0.0-alpha.9                                ...           2 years ago
  • 8.0.0-alpha.8                                ...           2 years ago
  • 8.0.0-alpha.6                                ...           2 years ago
  • 8.0.0-alpha.5                                ...           2 years ago
  • 8.0.0-alpha.4                                ...           2 years ago
  • 8.0.0-alpha.3                                ...           2 years ago
  • 8.0.0-alpha.2                                ...           2 years ago
  • 8.0.0-alpha.1                                ...           2 years ago
  • 7.1.2                                ...           3 years ago
  • 7.1.1                                ...           3 years ago
  • 7.1.0                                ...           3 years ago
  • 7.0.18                                ...           3 years ago
  • 7.0.17                                ...           3 years ago
  • 7.0.16                                ...           3 years ago
  • 7.0.15                                ...           3 years ago
  • 7.0.14                                ...           3 years ago
  • 7.0.13                                ...           3 years ago
  • 7.0.12                                ...           3 years ago
  • 7.0.11                                ...           3 years ago
  • 7.0.10                                ...           3 years ago
  • 7.0.9                                ...           3 years ago
  • 7.0.8                                ...           3 years ago
  • 7.0.7                                ...           3 years ago
  • 7.0.6                                ...           3 years ago
  • 7.0.5                                ...           3 years ago
  • 7.0.4                                ...           3 years ago
  • 7.0.3                                ...           3 years ago
  • 7.0.2                                ...           3 years ago
  • 7.0.1                                ...           3 years ago
  • 7.0.0                                ...           4 years ago
  • 6.0.0                                ...           4 years ago
  • 0.5.8                                ...           5 years ago
  • 0.5.7                                ...           5 years ago
  • 0.5.6                                ...           5 years ago
  • 0.5.5                                ...           5 years ago
  • 0.5.4                                ...           5 years ago
  • 0.5.3                                ...           5 years ago
  • 0.5.2                                ...           5 years ago
  • 0.5.1                                ...           5 years ago
  • 0.5.0                                ...           5 years ago
  • 0.4.0                                ...           5 years ago
  • 0.3.5                                ...           5 years ago
  • 0.3.4                                ...           5 years ago
  • 0.3.3                                ...           6 years ago
  • 0.3.2                                ...           6 years ago
  • 0.3.0                                ...           6 years ago
  • 0.2.16                                ...           6 years ago
  • 0.2.15                                ...           6 years ago
  • 0.2.14                                ...           6 years ago
  • 0.2.13                                ...           6 years ago
  • 0.2.12                                ...           6 years ago
  • 0.2.11                                ...           6 years ago
Maintainers (2)
Downloads
Today 194
This Week 194
This Month 1,406
Last Day 82
Last Week 1,080
Last Month 4,638
Dependencies (12)
Dev Dependencies (32)
Dependents (157)

Copyright 2014 - 2016 © taobao.org |