Skip to content

Node Shapes

Mermaid supports many different node shapes.


All Available Shapes


Shape Reference

Rectangle (Default)

Syntax: [text]


Rounded Rectangle

Syntax: (text)


Stadium Shape

Syntax: ([text])


Subroutine

Syntax: [[text]]


Database/Cylinder

Syntax: [(text)]


Circle

Syntax: ((text))


Diamond (Decision)

Syntax: {text}


Hexagon

Syntax:


Parallelogram

Syntax: [/text/] or [\text\]


Trapezoid

Syntax: [/text\] or [\text/]


Asymmetric

Syntax: >text]


Shapes in Action

Process Flow with Shapes


Best Practices

ShapeBest Used For
Rectangle []General steps
Rounded ()Soft actions
Stadium ([])Start/End
Diamond {}Decisions
Database [()]Data storage
Circle (())Connectors
Parallelogram [//]Input/Output
Hexagon Preparation

Mermaid Diagram Style Comparison