🧜Mermaid-Flowchart
Cheat Sheet for Mermaid.
1. Flowcharts
A flowchart is a type of diagram that represents an algorithm, workflow or process. The flowchart shows the steps as boxes of various kinds, and their order by connecting the boxes with arrows. This diagrammatic representation illustrates a solution model to a given problem.
1.1 Graph
Possible directions are:
TB
- top bottomBT
- bottom topRL
- right leftLR
- left rightTD
- same as TB
TB
BT
RL
LR
TD
1.2 Nodes & shapes
Node(Default)
8a37b9ee03f84af584d9b57b1aac8f69
Node with Text
Node with Round Edges
Node in Circle Form
Node in Asymmetric Shape
Node in Rhombus Form
1.3 Links Between Nodes
Link with Arrow Head
graph LR;A-->B
Open Link
graph LR;A---B
Text on Links(1)
graph LR;A-- This is the text ---B
Text on Links(2)
graph LR;A---|This is the text|B
Link with Arrow Head and Text(1)
graph LR;A-->|text|B
Link with Arrow Head and Text(2)
graph LR;A-- text -->B
Dotted Link
graph LR;A-.->B;
Dotted Link with Text
graph LR;A-. text .-> B
Thick Link
graph LR;A ==> B
Thick link with text
graph LR;A == text ==> B
1.4 Subgraphs
Syntax:
Example:
4. Demos
4.1 Basic Flowchart
4.2 Flowchart with Decision
4.3 Larger Flowchart with Some Styling
5. References
Last updated