Skip to content
Connect an agent

Language reference

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

QuestionAnswer
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

TokenLineArrowheadsUse it for
<-->dashedbothA two-way link that is optional or indirect.
-->dashedendA reply, a read, or a link that is optional or indirect.
<->solidbothA two-way call or sync.
..>dottedendAn asynchronous call: a webhook, an event, a pull, or a push that is not waited for.
->solidendA call or a flow of data.
--solidnoneAn 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.

LabelIcon
yesstatus:yes
nostatus:no
successstatus:success
failedstatus:error
deniedstatus:denied
expiredstatus:expired
crashstatus:bug
verifiedstatus: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.

IconPhrases
lucide:eyereads, read, reading, reads from, read from, queries
lucide:square-penwrites, write, writing, writes to, write to, inserts
lucide:databasestores, store, stores in, store in, caches, caches in
lucide:hard-drivemounts, mount, mounted by, mounted at, mounted in, mounted on
lucide:sendsends, send, sends to, publishes, publish, publishes to
lucide:inboxreceives, receive, consumes, consume, consumes from, subscribes
lucide:arrow-right-leftcalls, call, invokes, invoke, requests, request
lucide:globeroutes, routes to, route to, forwards, forwards to, forward to
lucide:linkdepends on, depend on, requires, needs, required by, needed by
lucide:plugprovides, exposes, serves, provided by, exposed by, served by
lucide:zaptriggers, trigger, starts, kicks off, schedules, wakes
lucide:rocketdeploys, deploy, deploys to, deploy to, releases to, ships to
lucide:key-roundauthenticates, authenticate, authenticates with, authenticates against, authorizes, authorize
lucide:key-roundreads secret, reads secrets, read secret, read secrets, read credentials, fetches secret
lucide:activityreports, reports to, logs, logs to, metrics, telemetry
lucide:downloadpulls image, pulls images, pulls images from, pulls image from, pull image, pull images
lucide:copyreplicates, replicate, replication, replicates to, replicate to, replicates from
lucide:refresh-cwsyncs, syncs to, syncs with, sync to, sync with, synchronizes
lucide:database-backupbacks up, backs up to, back up to, backup, backups, nightly backup
lucide:uploadpush image, push images, pushes image, pushes images, pushes image to, pushes images to
lucide:waves-horizontalstreams, stream, streams to, stream to, streams changes, change data capture
lucide:downloadexports, export, exports to, export to, exported to, exported by
lucide:uploadimports, import, imports from, import from, ingests, ingest
lucide:hammerbuilds, build, builds image, builds images, compiles, built by
lucide:scan-searchscans, scan, scans for, scanned by, vulnerability scan, security scan
lucide:lockencrypts, encrypt, encrypts with, decrypts, decrypt, encrypted with
lucide:signpostresolves, resolve, resolves to, dns lookup, dns, resolved by
lucide:check-checkapproves, 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.

OptionWhereTakesWhat it does
animateThe header lineon, offDashes 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
animateAn edge or a messageon, offAnimates 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
numberedThe header lineon, offDraws 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
startThe header line0 to 999The number of the first badge. The default is 1. It needs numbered=on. Example: sequence "Login" numbered=on start=5
stepAn edge or a messageoff, or 0 to 999step=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
roleAn edge or a messagedata, identity, async, privateFlow 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
legendThe header lineoff, on, left, center, rightFlow 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
legendpartsThe header linelines, boxes, icons, groups, changes, all, basicFlow 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.

OptionWhereTakesWhat it does
spacingThe header linecompact, normal, roomyHow 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
edgesThe header lineorthogonal, spline, straightHow 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
fitThe header lineauto, wide, tall, squareThe 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
notesThe header linebeside, columnWhere 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
tabsThe header lineplate, headingHow 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
mainAn edgeon, offMarks 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
alignA line of its own2 to 12 node idsKeeps 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=on written 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=on on the header, then animate=off on the lines that should rest.

Step numbers

  • The count runs in the order written, through loops, alternatives, and parallel blocks, and starts at 1. start=5 begins at 5.
  • step=off on a line leaves it without a badge and does not use up a number. step=12 sets 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.

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

DocWhy
Language referenceEvery page of the reference and what each covers
Flow node typesThe nodes an edge joins
Icon setsThe status icons an edge label can use
Writing diagramsEdges in context