Edges on one side of a node Two-way pair — An arrowhead and the edge that leaves beside it should not touch. Open in PlaygroundTwo-way pairs in a triangle Open in PlaygroundDiamond with an edge back to it — Three edges on the tip of the diamond, and one in and one out on top of F. Open in PlaygroundDecision with loops Open in PlaygroundTree Open in PlaygroundFan out, 3 Open in PlaygroundFan out, 7 — More edges than the hub has room for, so they share a place. Open in PlaygroundFan in, 3 Open in PlaygroundFan in, 7 Open in PlaygroundHub with edges both ways Open in PlaygroundParallel edges Open in PlaygroundSelf-loops with other edges Open in PlaygroundArrow types and line styles Open in PlaygroundDirections TD Open in PlaygroundBT Open in PlaygroundLR Open in PlaygroundRL Open in PlaygroundShapes Sheet 1, top to bottom — Every edge should end on the outline of its shape. Open in PlaygroundSheet 2, top to bottom Open in PlaygroundSheet 3, top to bottom Open in PlaygroundSheet 4, top to bottom Open in PlaygroundSheet 5, top to bottom Open in PlaygroundSheet 6, top to bottom Open in PlaygroundSheet 1, left to right Open in PlaygroundSheet 2, left to right Open in PlaygroundSheet 3, left to right Open in PlaygroundSheet 4, left to right Open in PlaygroundSheet 5, left to right Open in PlaygroundSheet 6, left to right Open in PlaygroundSubgraphs Edges across and onto groups — An edge that ends on a group should not land where another edge passes through its border. Open in PlaygroundTwo-way between groups Open in PlaygroundNested groups Open in PlaygroundGroups with their own direction Open in PlaygroundGroup to group, both ways Open in PlaygroundWide and dense Notes into two hubs — Long runs across the gap between two ranks. Open in PlaygroundFan in, 30 Open in PlaygroundFan out, 30, left to right Open in PlaygroundTwo dense ranks Open in PlaygroundChain with edges that skip ranks Open in PlaygroundShort nodes beside a tall one Open in PlaygroundWide rank over a narrow one Open in PlaygroundLabels Labels on a fan Open in PlaygroundLabels on a two-way pair Open in PlaygroundTall and wide nodes Open in PlaygroundCurves basis Open in Playgroundlinear Open in Playgroundstep Open in PlaygroundstepBefore Open in PlaygroundstepAfter Open in PlaygroundDocumentation examples 1. flowchart LR · id Open in PlaygroundNode id
2. flowchart LR · id1[This is the text in the box] Open in PlaygroundNode with text This is the text in the box
3. flowchart LR · id["This ❤ Unicode"] Open in PlaygroundThis ❤ Unicode
4. flowchart LR · markdown["`This **is** _Markdown_`"] Open in Playground5. flowchart TD · Start --> Stop Open in Playground6. flowchart LR · Start --> Stop Open in Playground7. flowchart LR · subgraph Client Open in Playground8. flowchart LR · subgraph Client Open in Playground9. flowchart LR · id1(This is the text in the box) Open in PlaygroundThis is the text in the box
10. flowchart LR · id1([This is the text in the box]) Open in PlaygroundThis is the text in the box
11. flowchart LR · id1[[This is the text in the box]] Open in Playground12. flowchart LR · id1[(Database)] Open in Playground13. flowchart LR · id1((This is the text in the circle)) Open in PlaygroundThis is the text in the circle
14. flowchart LR · id1>This is the text in the box] Open in Playground15. flowchart LR · id1{This is the text in the box} Open in Playground16. flowchart LR · id1{{This is the text in the box}} Open in Playground17. flowchart TD · id1[/This is the text in the box/] Open in Playground18. flowchart TD · id1[\This is the text in the box\] Open in Playground19. flowchart TD · A[/Christmas\] Open in Playground20. flowchart TD · B[\Go shopping/] Open in Playground21. flowchart TD · id1(((This is the text in the circle))) Open in PlaygroundThis is the text in the circle
22. flowchart RL · A@{ shape: manual-file, label: "File Handling"} Open in Playground23. flowchart TD · A@{ shape: rect, label: "This is a process" } Open in PlaygroundThis is a process
24. flowchart TD · A@{ shape: rounded, label: "This is an event" } Open in PlaygroundThis is an event
25. flowchart TD · A@{ shape: stadium, label: "Terminal point" } Open in PlaygroundTerminal point
26. flowchart TD · A@{ shape: subproc, label: "This is a subprocess" } Open in Playground27. flowchart TD · A@{ shape: cyl, label: "Database" } Open in Playground28. flowchart TD · A@{ shape: circle, label: "Start" } Open in PlaygroundStart
29. flowchart TD · A@{ shape: odd, label: "Odd shape" } Open in Playground30. flowchart TD · A@{ shape: diamond, label: "Decision" } Open in Playground31. flowchart TD · A@{ shape: hex, label: "Prepare conditional" } Open in Playground32. flowchart TD · A@{ shape: lean-r, label: "Input/Output" } Open in Playground33. flowchart TD · A@{ shape: lean-l, label: "Output/Input" } Open in Playground34. flowchart TD · A@{ shape: datastore, label: "Datastore" } Open in Playground35. flowchart TD · A@{ shape: trap-b, label: "Priority action" } Open in Playground36. flowchart TD · A@{ shape: trap-t, label: "Manual operation" } Open in Playground37. flowchart TD · A@{ shape: dbl-circ, label: "Stop" } Open in PlaygroundStop
38. flowchart TD · A@{ shape: text, label: "This is a text block" } Open in PlaygroundThis is a text block
39. flowchart TD · A@{ shape: notch-rect, label: "Card" } Open in Playground40. flowchart TD · A@{ shape: lin-rect, label: "Lined process" } Open in Playground41. flowchart TD · A@{ shape: sm-circ, label: "Small start" } Open in Playground
42. flowchart TD · A@{ shape: framed-circle, label: "Stop" } Open in Playground
43. flowchart TD · A@{ shape: fork, label: "Fork or Join" } Open in Playground
44. flowchart TD · A@{ shape: hourglass, label: "Collate" } Open in Playground45. flowchart TD · A@{ shape: comment, label: "Comment" } Open in Playground46. flowchart TD · A@{ shape: brace-r, label: "Comment" } Open in Playground47. flowchart TD · A@{ shape: braces, label: "Comment" } Open in Playground48. flowchart TD · A@{ shape: bolt, label: "Communication link" } Open in Playground49. flowchart TD · A@{ shape: doc, label: "Document" } Open in Playground50. flowchart TD · A@{ shape: delay, label: "Delay" } Open in Playground51. flowchart TD · A@{ shape: das, label: "Direct access storage" } Open in Playground52. flowchart TD · A@{ shape: lin-cyl, label: "Disk storage" } Open in Playground53. flowchart TD · A@{ shape: curv-trap, label: "Display" } Open in Playground54. flowchart TD · A@{ shape: div-rect, label: "Divided process" } Open in Playground55. flowchart TD · A@{ shape: tri, label: "Extract" } Open in Playground56. flowchart TD · A@{ shape: win-pane, label: "Internal storage" } Open in Playground57. flowchart TD · A@{ shape: f-circ, label: "Junction" } Open in Playground
58. flowchart TD · A@{ shape: lin-doc, label: "Lined document" } Open in Playground59. flowchart TD · A@{ shape: notch-pent, label: "Loop limit" } Open in Playground60. flowchart TD · A@{ shape: flip-tri, label: "Manual file" } Open in Playground61. flowchart TD · A@{ shape: sl-rect, label: "Manual input" } Open in Playground62. flowchart TD · A@{ shape: docs, label: "Multiple documents" } Open in Playground63. flowchart TD · A@{ shape: processes, label: "Multiple processes" } Open in PlaygroundMultiple processes
64. flowchart TD · A@{ shape: flag, label: "Paper tape" } Open in Playground65. flowchart TD · A@{ shape: bow-rect, label: "Stored data" } Open in Playground66. flowchart TD · A@{ shape: cross-circ, label: "Summary" } Open in Playground67. flowchart TD · A@{ shape: tag-doc, label: "Tagged document" } Open in Playground68. flowchart TD · A@{ shape: tag-rect, label: "Tagged process" } Open in Playground69. flowchart TD · A@{ icon: "fa:user", form: "square", label: "User Icon", pos: "t… Open in Playground70. flowchart TD · A@{ img: "https://mermaid.js.org/favicon.svg", label: "My exampl… Open in PlaygroundMy example image label
71. flowchart LR · A-->B Open in Playground72. flowchart LR · A --- B Open in Playground73. flowchart LR · A-- This is the text! ---B Open in Playground74. flowchart LR · A---|This is the text|B Open in Playground75. flowchart LR · A-->|text|B Open in Playground76. flowchart LR · A-- text -->B Open in Playground77. flowchart LR · A-.->B; Open in Playground78. flowchart LR · A-. text .-> B Open in Playground79. flowchart LR · A ==> B Open in Playground80. flowchart LR · A == text ==> B Open in Playground81. flowchart LR · A ~~~ B Open in PlaygroundA B
82. flowchart LR · A -- text --> B -- text2 --> C Open in Playground83. flowchart LR · a --> b & c--> d Open in Playground84. flowchart TB · A & B--> C & D Open in Playground85. flowchart TB · A --> C Open in Playground86. flowchart LR · A e1@--> B Open in Playground87. flowchart LR · A e1@==> B Open in Playground88. flowchart LR · A e1@--> B Open in Playground89. flowchart LR · A e1@--> B Open in Playground90. flowchart LR · A --o B Open in Playground91. flowchart LR · A --x B Open in Playground92. flowchart LR · A o--o B Open in Playground93. flowchart TD · A[Start] --> B{Is it?} Open in Playground94. flowchart TD · A[Start] --> B{Is it?} Open in Playground95. flowchart LR · id1["This is the (text) in the box"] Open in PlaygroundThis is the (text) in the box
96. flowchart LR · A["A double quote:#quot;"] --> B["A dec char:#9829;"] Open in Playground97. flowchart TB · c1-->a2 Open in Playground98. flowchart TB · c1-->a2 Open in Playground99. flowchart TB · c1-->a2 Open in Playground100. flowchart LR · subgraph TOP Open in Playground101. flowchart LR · subgraph subgraph1 Open in Playground102. flowchart TD · Start --> one Open in Playground103. flowchart LR · subgraph "One" Open in Playground104. flowchart LR · A-->B Open in Playground105. flowchart LR · A-->B Open in Playground106. flowchart LR · A -- text --> B -- text2 --> C Open in Playground107. flowchart LR · A e1@==> B Open in Playground108. flowchart LR · id1(Start)-->id2(Stop) Open in Playground109. flowchart LR · A:::someclass --> B Open in Playground110. flowchart LR · A:::foo & B:::bar --> C:::foobar Open in Playground111. flowchart LR · A:::myStyle --> B Open in Playground112. flowchart TD · B["fa:fa-twitter for peace"] Open in Playground113. flowchart TD · B["fa:fa-twitter for peace"] Open in Playground114. flowchart LR · A[Hard edge] -->|Link text| B(Round edge) Open in Playground