Boxes and structureΒΆ

The box is the basic building block. A box with a label is a single line:

A labelled box

Open in editor

box "hello"

Give shapes names (identifiers) so you can refer to them later. A name goes before a colon:

Named boxes

Open in editor

Client: box "Client"
Server: box "Server"

Lines starting with // are comments and are ignored when rendering:

Comments

Open in editor

// the entry point of the system
box "start here"

A box sizes itself to its label, but you can set an explicit width or height. Unpositioned boxes flow left to right, and gap sets the space before a box in that flow:

Size and gap

Open in editor

A: box "wide" width 150
B: box "tall" height 80 gap 30
C: box "snug" gap 4

Next: connect boxes with Arrows and flow.