Mermaid diagrams support different flow directions using the graph
keyword followed by a direction specifier.
Keyword | Meaning | Layout Direction |
---|---|---|
TD |
Top Down | Nodes flow Top β Down (default) |
TB |
Top Bottom (alias of TD ) |
Same as TD |
LR |
Left to Right | Nodes flow Left β Right |
RL |
Right to Left | Nodes flow Right β Left |
BT |
Bottom to Top | Nodes flow Bottom β Top |
graph TD
A[Start] --> B[Process] --> C[End]
graph LR
A[Start] --> B[Process] --> C[End]
graph RL
A[Start] --> B[Process] --> C[End]
graph BT
A[Start] --> B[Process] --> C[End]
In a Markdown file:
```mermaid graph LR A --> B ```
That's it!
Made for: Ed Burns