Reladraw Syntax Cheatsheet

Everything you need on one page. Official spec: SYNTAX.md.

Why placement beats auto-layout

Auto-layout tools (Mermaid, Graphviz, D2) decide where things go — great until you care where things go. Drag tools (draw.io, Excalidraw) give control but every edit is hand-work. Reladraw is the middle: positions are stated as relationships (below of, level with), so edits are one-line changes and agents can draw too.

The 8 statements you need

Declare a nodenode id "Label"node api "API"
Place it… below / above / left of / right of othernode db "DB" below api
Diagonal placementbelow-left / below-right / above-left / above-right ofnode cache "Redis" above-right of api
Align… level with othernode gw "GW" level with api
Connectedge a -> b "label"edge api -> db "queries"
Edge ports… from: top / bottom / left / right to: …edge api -> db from: bottom to: top
Groupcluster id "Label" { … }cluster vpc "VPC" { node alb }
Themediagram theme: namediagram theme: nord

Try it

Open the playground with any template from the template gallery.