Arrows and edge labels
The arrow tokens, the labels and icons an edge can carry, the level edge that keeps mirrored columns side by side, and the options that animate a line, number the steps, or color a line by what it carries.
TL;DR
| Question | Answer |
|---|---|
| Which arrows exist? | <-->, -->, <->, ..>, ->, --. |
| How is an edge labelled? | a -> b : "label", and with an icon a -> b : "label" icon=status:yes. |
| Which labels get an icon without being asked? | yes, no, success, failed, denied, expired, crash, verified, and a flow label that names a relationship with a verb, such as reads, writes orders or deploys to. Write icon=none on the edge to remove it, or icons=off on the header to remove them all. |
| Can an edge join a group? | No. Edges connect nodes, never an overlay or a group. |
| How do I make data move along a line? | a -> b animate=on, or animate=on on the header for every line with an arrowhead. A viewer who asks for reduced motion sees still lines. |
| How do I number the steps? | numbered=on on the header. start=5 begins at 5, and step=off or step=12 on a line skips it or sets its number. |
| How do I show what a line carries? | role=data, identity, async or private on a flow edge colors the line by meaning, and the legend under the diagram names each role used. The legend is on by default, centred; legend=left or legend=right aligns it, a tall diagram takes it down its right side, and legend=off on the header, the repository settings, or the organisation's or your own settings turns it off. |
Arrows
| Token | Line | Arrowheads | Use it for |
|---|---|---|---|
<--> | dashed | both | A two-way link that is optional or indirect. |
--> | dashed | end | A reply, a read, or a link that is optional or indirect. |
<-> | solid | both | A two-way call or sync. |
..> | dotted | end | An asynchronous call: a webhook, an event, a pull, or a push that is not waited for. |
-> | solid | end | A call or a flow of data. |
-- | solid | none | An association with no direction. |
Level edges
An edge between two nodes that are already side by side is drawn straight across instead of as a step forward. Two nodes count as side by side when other edges reach both and, without this edge, they sit the same distance from the start, as a primary and a replica database do. Such an edge, often dotted and labelled "replication", never pushes one of the two a layer away from its twin, so mirrored columns such as two availability zones stay level. When something sits between them the edge goes round it.
Labels and icons
An edge may carry a label and an icon: a -> b : "label" icon=status:yes. These labels get an icon without being asked, so the branches of a decision read at a glance. Write icon=none on the edge to remove it.
| Label | Icon |
|---|---|
yes | status:yes |
no | status:no |
success | status:success |
failed | status:error |
denied | status:denied |
expired | status:expired |
crash | status:bug |
verified | status:verified |
Verbs
A flow edge label that names a relationship with a verb draws that relationship's icon, the same one an imported diagram draws for it. The whole label may be the verb (reads, depends on), or start with it and go on with what is acted on, in five words or fewer (writes orders, publishes OrderPlaced to Kafka). The longest phrase wins, so sends logs is reporting and not sending, and a label that starts with a thing named after a verb, such as Read replica or Pull request, draws nothing. icon= on the edge picks another icon, icon=none keeps the label plain, and icons=off on the header turns every automatic icon off.
| Icon | Phrases |
|---|---|
lucide:eye | reads, read, reading, reads from, read from, queries |
lucide:square-pen | writes, write, writing, writes to, write to, inserts |
lucide:database | stores, store, stores in, store in, caches, caches in |
lucide:hard-drive | mounts, mount, mounted by, mounted at, mounted in, mounted on |
lucide:send | sends, send, sends to, publishes, publish, publishes to |
lucide:inbox | receives, receive, consumes, consume, consumes from, subscribes |
lucide:arrow-right-left | calls, call, invokes, invoke, requests, request |
lucide:globe | routes, routes to, route to, forwards, forwards to, forward to |
lucide:link | depends on, depend on, requires, needs, required by, needed by |
lucide:plug | provides, exposes, serves, provided by, exposed by, served by |
lucide:zap | triggers, trigger, starts, kicks off, schedules, wakes |
lucide:rocket | deploys, deploy, deploys to, deploy to, releases to, ships to |
lucide:key-round | authenticates, authenticate, authenticates with, authenticates against, authorizes, authorize |
lucide:key-round | reads secret, reads secrets, read secret, read secrets, read credentials, fetches secret |
lucide:activity | reports, reports to, logs, logs to, metrics, telemetry |
lucide:download | pulls image, pulls images, pulls images from, pulls image from, pull image, pull images |
lucide:copy | replicates, replicate, replication, replicates to, replicate to, replicates from |
lucide:refresh-cw | syncs, syncs to, syncs with, sync to, sync with, synchronizes |
lucide:database-backup | backs up, backs up to, back up to, backup, backups, nightly backup |
lucide:upload | push image, push images, pushes image, pushes images, pushes image to, pushes images to |
lucide:waves-horizontal | streams, stream, streams to, stream to, streams changes, change data capture |
lucide:download | exports, export, exports to, export to, exported to, exported by |
lucide:upload | imports, import, imports from, import from, ingests, ingest |
lucide:hammer | builds, build, builds image, builds images, compiles, built by |
lucide:scan-search | scans, scan, scans for, scanned by, vulnerability scan, security scan |
lucide:lock | encrypts, encrypt, encrypts with, decrypts, decrypt, encrypted with |
lucide:signpost | resolves, resolve, resolves to, dns lookup, dns, resolved by |
lucide:check-check | approves, approve, reviews, review, approved by, reviewed by |
Animated lines, step numbers and line roles
Two opt-in options draw more than the shape of a diagram. animate=on makes dashes travel along a line toward its arrowhead, so a reader sees data or events move. numbered=on draws a numbered badge on each edge or message in the order written, so a reader can follow a story by number. Both are off unless written, and a diagram that uses neither is drawn exactly as before. They work on flow and sequence diagrams, and a schema takes neither.
| Option | Where | Takes | What it does |
|---|---|---|---|
animate | The header line | on, off | Dashes travel along every line that has an arrowhead, in the direction of the arrowhead, so a reader sees data or events move. A line opts out with animate=off. The default is off, and a viewer who asks for reduced motion sees still lines. Example: flow "Data flow" animate=on |
animate | An edge or a message | on, off | Animates this one line, or with off keeps it still when the header turns animation on. A line with no arrowhead (--) has no direction, so animate=on on it is an error. A line with two arrowheads animates from its first end to its second. Example: api -> db : "write" animate=on |
numbered | The header line | on, off | Draws a numbered badge on each edge or message in the order written. One counter runs through loops, alternatives, and parallel blocks. The text description carries the numbers. Example: sequence "Login" numbered=on |
start | The header line | 0 to 999 | The number of the first badge. The default is 1. It needs numbered=on. Example: sequence "Login" numbered=on start=5 |
step | An edge or a message | off, or 0 to 999 | step=off leaves this line without a badge and does not use up a number. step=12 gives it the badge 12, and the next line continues from 13. It needs numbered=on in the header. Example: api -> cache : "warm" step=off |
role | An edge or a message | data, identity, async, private | Flow edges only. What the line carries: data (stored data), identity (sign-in, tokens), async (events, queues), private (private network). It colours the line, a solid async line is dotted, and the legend (legend=on) names each role used. Example: api -> db : "read" role=data |
legend | The header line | off, on, left, center, right | Flow only. A legend of what the picture uses (lines, roles, boxes, icons, groups, changes), centred under the diagram; left or right aligns it, a tall diagram takes it beside. On unless off. Example: flow "Platform" legend=left |
legendparts | The header line | lines, boxes, icons, groups, changes, all, basic | Flow only. The legend's parts, a comma list of lines, boxes, icons, groups, changes; all (the default) or basic (no icons). Example: flow "Platform" legend=on legendparts=lines,boxes |
Layout and line shape
A flow diagram is laid out by the engine, and these choose how: the room between boxes, the shape of the lines, the shape of the whole picture, which nodes share a rank, and which lines form the main path. Each has a default that draws the diagram as it always was. spacing= and edges= can also come from a repository's plotwork.config.json, an organisation, or a person's own settings; a diagram's header wins over all of them.
| Option | Where | Takes | What it does |
|---|---|---|---|
spacing | The header line | compact, normal, roomy | How far apart the boxes and layers sit: compact for a dense page, roomy for a slide, normal by default. Text and padding stay the same. Example: flow "Platform" spacing=roomy |
edges | The header line | orthogonal, spline, straight | How lines are drawn: orthogonal (straight runs, rounded corners, the default), spline (one smooth curve through the same route), or straight (slanted runs between the ends). Example: flow "Platform" edges=spline |
fit | The header line | auto, wide, tall, square | The shape the picture is made for, which decides direction=auto: wide always lays it across (slides), tall always down (phones), square takes the way nearer a square. A named direction wins. Example: flow "Platform" fit=wide |
notes | The header line | beside, column | Where the notes of boxes and groups (note=) go: beside each one, its brace against the box, where the room is clear (the default), or column, lined up down the outer edge with a dotted leader to each box. Example: flow "Platform" notes=column |
tabs | The header line | plate, heading | How a group's name is drawn in its corner: plate, a raised tab outlined in the frame's colour (the default), or heading, flat on the frame's own fill. Example: flow "Platform" tabs=heading |
main | An edge | on, off | Marks the line as part of the main path: drawn heavier, kept as straight as layout can, and named in the legend. Example: web -> api : "places order" main=on |
align | A line of its own | 2 to 12 node ids | Keeps the nodes in one rank: one row of a diagram drawn down, one column of a diagram drawn across. A node is in one align statement at most. Example: align payments, email |
Animated lines
- The dashes move in the direction of the arrowhead. A line with two arrowheads (
<->) moves from its first end to its second, and a line with none (--) never moves, because nothing flows along it;animate=onwritten on one is an error. - A solid line is drawn as a dash and a gap only while it moves. With motion off it is the plain solid line, so the difference between a call (
->), a reply (-->), and an asynchronous call (..>) stays in the picture. - The arrowheads, the labels, and the numbered badges never move.
- A viewer whose system asks for reduced motion sees still lines, and a picture shown where scripts and style rules do not run is still too. The motion is a CSS animation inside the SVG, so it runs in an image tag, on GitHub, and in the docs.
- Animate the lines that carry the story. When every line moves, nothing stands out; write
animate=onon the header, thenanimate=offon the lines that should rest.
flow "Event pipeline" direction=right animate=on
node app client "Web app"node api service "Ingest API"node queue queue "Event queue"node worker function "Worker"node db database "Warehouse"
app -> api : "POST /events"api -> queue : "enqueue" role=asyncqueue ..> worker : "pull"worker -> db : "write batch" role=dataworker --> api : "ack" animate=offNodes:
- Web app, client
- Ingest API, service
- Event queue, queue
- Worker, function
- Warehouse, database
Connections:
- Web app to Ingest API: POST /events
- Ingest API to Event queue (asynchronous line): enqueue
- Event queue to Worker (dotted): pull
- Worker to Warehouse (stored data line): write batch
- Worker to Ingest API (dashed): ack
Step numbers
- The count runs in the order written, through loops, alternatives, and parallel blocks, and starts at 1.
start=5begins at 5. step=offon a line leaves it without a badge and does not use up a number.step=12sets the badge to 12, and the next line continues from 13.- A sequence message has its badge directly above the arrow, before its label. A flow edge has its badge at the left end of its label, and an edge with no label has the badge on its line. Layout makes room for the badge, so it never covers a node or a label.
- The text description carries the numbers, as in
1. User to API: POST /login, so a reader who cannot see the badges has them. - More than 25 numbered steps in one diagram is the density warning
W200: split the diagram into phases that each restart at 1.
sequence "Sign in" numbered=on
actor user person "User"actor web client "Browser"actor api service "Auth API"
user -> web : "Open the sign in page"web -> api : "POST /login"loop "up to 3 attempts" { api -> api : "Check the password"}api --> web : "200 with a session cookie"web --> user : "Show the account page" step=offParticipants:
- User, person
- Browser, client
- Auth API, service
Steps:
-
- User to Browser: Open the sign in page
-
- Browser to Auth API: POST /login
- loop: up to 3 attempts
- 3. Auth API to Auth API: Check the password
-
- Auth API to Browser (dashed): 200 with a session cookie
- Browser to User (dashed): Show the account page
Line roles
A flow edge can say what it carries with role=: data for reads and writes of stored data, identity for sign-in and tokens, async for events and messages, and private for private network links. Each role has its own color, an async line drawn with a solid arrow is dotted, and the outline names the role in words, so the meaning never rests on color alone. The legend under the diagram, on by default, names each role used, with every other kind of line, type of box, product icon, group type, and planned change in the picture. A brand theme colors the roles with the brand. Red, green and amber are never used, because they mean a status.
A role is never given by itself, because a colour means something. When an arrow's label names a relationship that has one, such as reads (data), publishes (async), or authenticates (identity), and the arrow has no role= and no icon=, warning W500 names the arrows, one warning per role, with the role= to add in its hint. W500 is a style suggestion, like W204 and W205: validate --strict and the Action's fail-on: warning pass it.
Make it look finished
- Label each arrow with a verb, such as "reads", "writes orders", "publishes OrderPlaced", "calls", "deploys to", or "authenticates": the label then draws the icon of that relationship (verbIcons). icon= picks another icon; icon=none keeps the label plain.
- Add role= to the arrows whose line means something: role=data for reads and writes of stored data, role=async for messages nobody waits for, role=identity for sign-in and credentials, role=private for private network links. The line takes the role's colour and the legend names it; warning W500 lists the arrows to mark.
- Give every group a type= (network, subnet, environment, data-tier, messaging, cluster, ci-cd, observability, and the rest), so its frame, tone, and icon follow. A group named plainly, such as "VPC", "Production", "Kafka", or "Monitoring", gets its type by itself; type=none keeps it plain.
- Name each node after the product it is ("Postgres", "Redis", "Amazon S3") so it draws the mark, and choose the node type that says what it is.
- Keep labels to two to four words; the picture carries the rest.
See also
| Doc | Why |
|---|---|
| Language reference | Every page of the reference and what each covers |
| Flow node types | The nodes an edge joins |
| Icon sets | The status icons an edge label can use |
| Writing diagrams | Edges in context |