Loading…
Loading…
The language has a small, consistent grammar. Learn these rules once and they hold across every family.
Because attributes are positional, the same value means the same thing
everywhere. A palette colour is always a colour, a shape word is always a shape,
a set/name token is always an icon. You rarely write a key.
Ids are optional too. A node's name is its label, and its id is the slugified name. You only reach for an explicit id when a label is long or repeated. A name first seen inside an edge is auto-declared, so quick sketches need no declarations at all.
{ … } blocks span
lines.// starts a comment, a whole line or a trailing one."…" only when it contains a reserved token: ->, <->, -->, :, =,
,, [, ], {, }, or //.: in an edge, message, or control statement is a label. It
runs to the end of the line (or to a trailing […] attribute list) and needs
no quotes.Name [attrs] declares a node whose label is the name and whose id is the
slug of that name (API Gateway → api-gateway).id = Name [attrs] gives an explicit id. Reach for this when a label is long,
when two nodes share a label, or when an edge would be clearer referring to a
short id.The first meaningful line may declare the family. Omit it and you get architecture, a graph that flows right. Each header is documented on its own page:
Next: attributes and styling, the words that colour, shape, and decorate a node.