Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Shapes

A node’s shape comes from the delimiters around its label, or from @{ shape: NAME }, which takes every Mermaid shape name and alias:

flowchart LR
    A[Process] --> B{Decision} --> C[(Database)]
    D@{ shape: doc, label: "Report" }
    E[Queue]@{ shape: das }
the drawing of the mermaid source above

When a node has both, @{ shape } wins, and the bracket text stays its label.

NameDelimitersAliases
rectA[text]proc, process, rectangle
roundedA(text)event
stadiumA([text])terminal, pill
fr-rectA[[text]]subprocess, subproc, framed-rectangle, subroutine
cylA[(text)]db, database, cylinder
circleA((text))circ
dbl-circA(((text)))double-circle
(ellipse)A(-text-)
oddA>text]
diamA{text}decision, diamond, question
hexA{{text}}hexagon, prepare
lean-rA[/text/]lean-right, in-out
lean-lA[\text\]lean-left, out-in
trap-bA[/text\]priority, trapezoid-bottom, trapezoid
trap-tA[\text/]manual, trapezoid-top, inv-trapezoid
datastoredata-store
folderdirectory
bucket
console
browser
person
bang
cloud
text
notch-rectcard, notched-rectangle
lin-rectlined-rectangle, lined-process, lin-proc, shaded-process
sm-circstart, small-circle
fr-circstop, framed-circle
forkjoin
hourglasscollate
bracecomment, brace-l
brace-r
braces
boltcom-link, lightning-bolt
docdocument
delayhalf-rounded-rectangle
h-cyldas, horizontal-cylinder
lin-cyldisk, lined-cylinder
curv-trapcurved-trapezoid, display
div-rectdiv-proc, divided-rectangle, divided-process
triextract, triangle
win-paneinternal-storage, window-pane
f-circjunction, filled-circle
notch-pentloop-limit, notched-pentagon
flip-trimanual-file, flipped-triangle
sl-rectmanual-input, sloped-rectangle
docsdocuments, st-doc, stacked-document
st-rectprocs, processes, stacked-rectangle
bow-rectstored-data, bow-tie-rectangle
cross-circsummary, crossed-circle
tag-doctagged-document
tag-recttagged-rectangle, tag-proc, tagged-process
flagpaper-tape
lin-doclined-document

Every shape has its own outline, as Mermaid draws it. Small, filled, and framed circles, forks, hourglasses, and bolts show no label. An unknown name, or one with uppercase letters or _, is an error and leaves the shape unchanged.

The shapes example draws the shapes that have delimiters.