Cheatsheet: MermaidJS

FlowChart

direction - top to down

graph TD
  a-->b
direction - top to down

direction - left to right

graph LR
direction - left to right

Shape: round rect

id(Label)
Shape: round rect

Shape: circle

id((Start))
Shape: circle

Shape: cylinder/database

id[(Database)]
Shape: cylinder/database

Shape: rhombus

id{is successful}
Shape: rhombus

Shape: double circle

id(((End)))
Shape: double circle

Edges: with arrow head

flowchart LR
  A-->B

Edges: without arrow

flowchart LR
  A --- B

Edges: with text

flowchart LR
  A---|This is the text|B

Sequence Diagram

line types

sequenceDiagram
  a->b: solid no arrow
  a-->b: dashed no arrow
  a-->>b: dashed with arrow
  b-->>a: reverse
line types

Class Diagrams

define class

classDiagram
class Person{
    String name
}