Skip to content

Diagrams

Every diagram type and its props.

Use this page to look up the props of a diagram component or one of the parts that goes inside it, and the node kinds, states, edge options and cards a <Flow> takes. To learn how to draw one, start at flow diagrams, sequence, timeline, layers, cycle and tree or SVG.

For alignment, sizing, and styling, see diagram design controls.

ComponentRoleUse when
<Flow>diagramAny system of boxes and arrows: an architecture, a request path, a pipeline. Place nodes with col/row (spans for wide nodes) or leave cells out for an automatic layout (layout, direction).
<SequenceDiagram>diagramWho calls whom, in order: a protocol, an API handshake, a retry. <Actor>s across the top, <Message>s top to bottom; the current message animates.
<Timeline>diagramMilestones in time order, with where we are now: a roadmap, a migration, a history. The line fills up to the latest milestone shown, or the one marked current.
<Layers>diagramA stacked architecture or ownership map: <Layer> bands top to bottom, each with <Item> chips.
<Cycle>diagramA loop of stages that repeats: an incident loop, a feedback cycle, an agent loop. steps walks it one stage per step; spin keeps a packet circling; an <Edge> between consecutive stages labels that arc.
<Tree>diagramA hierarchy: an org chart, a decision tree, a module tree. Nest <Node>s; direction down or right; at on a node reveals its branch.
<Svg>diagramA drawing someone made (a floor plan, a product sketch, an exported figure): inlined and cleaned at build time (no scripts, event handlers or external references), it takes brand colors (recolor, or data-fill/data-stroke on shapes), reveals elements by id per step (steps) and can draw its strokes on (draw).
<Node>part in <Flow>,A box in a <Flow>, <Tree> or <Cycle>. kind sets its shape and icon; icon overrides it ("none" drops it).
<Group>part in <Flow>A labelled container (a VPC, a region, "Client side"): nest the nodes in it; it wraps them, or takes its own col/row/colSpan/rowSpan.
<Edge>part in <Flow>A connection between two nodes; to equal to from draws a small loop on the node (a retry). In a <Cycle>, an <Edge> between consecutive stages labels or styles that arc.
<Packet>part in <Flow>Traffic along edges on a step: from/to or a multi-hop path, at (plays while that step is current) and until (to keep playing), reply for out, pause and back. Loops by default; play="once" rests at the end. from = to rides a self loop.
<Journey>part in <Flow>A request travelling hop by hop, one hop per step: path with back for the response, or <Hop> children with their own labels and replies; focus dims everything off the path; travelled edges stay lit (trail); pace="trip" plays the whole path on one step.
<Hop>part in <Journey>One hop of a <Journey>, with its own tag and reply.
<State>part in <Flow>Change a node or an edge from a step on: is="highlighted", "error", "success", "muted" or "default", with a badge.
<Focus>part in <Flow>Dim everything but some nodes (and the edges between them) for a range of steps.
<Actor>part in <SequenceDiagram>A participant of a <SequenceDiagram>, drawn as a node over its lifeline.
<Message>part in <SequenceDiagram>An arrow between lifelines; reply for a response, async for fire-and-forget, from = to for a call to itself.
<Milestone>part in <Timeline>One milestone of a <Timeline>: date, title and a short line of detail as children.
<Layer>part in <Layers>One band of a <Layers> stack. While the stack is built, the band its at step adds is picked out; once the last band is in, only bands with state stand out, so mark the band the stack is about with state="highlighted".
<Item>part in <Layer>One building block in a <Layer>, as a chip with its kind’s icon.

Diagrams and parts

Seven components are diagrams: you put one on a slide. The other thirteen are parts, and each part’s entry says where it goes (“Goes in”): a <Node> in a <Flow>, a <Group>, a <Cycle> or nested in its parent <Node> inside a <Tree>; a <Hop> only in a <Journey>; an <Item> only in a <Layer>. Below, each diagram is followed by its parts. A prop name a component does not take, or a value outside the ones it lists, fails the build naming the closest one.

<Timeline> here is the diagram; the timeline layout has its own page.

A node’s kind sets its shape and icon (service, database, queue and so on, each with aliases), its state takes one of five values (default, highlighted, muted, error, success; words that mean the same are accepted), <Edge> takes options such as a dashed line, a route style or an arrow at both ends, and card picks the node style the brand defines. All four are listed under node kinds, states, edges and cards at the end of this page.

card is a shared prop of <Node>, <Actor> and <Item>, and its own prop on <Flow>, <SequenceDiagram>, <Layers>, <Layer>, <Cycle> and <Tree>; <Timeline>, <Milestone> and <Svg> take none. The names a slide may use depend on the brand: deck brand <name> lists them, and the five standard ones exist in every brand.

Limits

deck lint holds diagrams to these numbers, the same as deck diagrams --json prints under limits:

  • Density. More than 12 nodes or 16 edges shown at one step is a diagram-too-dense warning.
  • Grid. 5 columns and 3 rows fit comfortably in the diagram layout. Past 7 columns or 4 rows the nodes are packed tighter than the gutters allow, and diagram-too-dense reports the diagram as cramped.
  • Text. An edge label takes 18 characters on a line and wraps to 2 lines; past that it ends in an ellipsis, and the full text stays in the accessible summary. A node title wraps to 3 lines at word boundaries before the node grows taller than its row. A word broken across lines leaves at least 3 characters on each.
  • Hard limits. Past these the build fails: 60 nodes, 120 edges, 24 particles in one packet or edge flow, 64 for a grid column, row, span or minimum size, and step 999 for an at or until.

Shared props

Several diagram components and parts take these props, with the same meaning in each. They are listed once here; each entry below names the ones it takes.

PropTypeDefaultDescription
align"left" | "center" | "right"—Place a compact drawing to the left, center or right.
lineStyle"solid" | "dashed" | "dotted"—The line pattern; uses the brand when omitted.
strokeWidthnumber—The connector width in canvas pixels.
idstring—Its id: what edges, packets and states name it by, and its id in the export description.
titlestring—What the diagram shows, in a few words: its accessible name. Every diagram needs one; the build fails without it.
heightnumber—A fixed height in canvas pixels; without it the diagram fills its region.
atnumber—The step that reveals it (or plays it); shown from the start when left out.
untilnumber—The step it stops at (exclusive); without it a packet plays only on at and a state lasts to the end.
state"default" | "highlighted" | "muted" | "error" | "success"defaultThe emphasis it starts with.
kindstringnodeWhat it is, which sets its shape and icon: one of the node kinds (nodeKinds), or an alias.
iconstring | IconComponent—An Iconify name (MDX), an icon component, a local image or an HTTPS image URL. Use "none" to omit the icon.
cardstring—The card (a node style the brand defines) it is drawn with: default, outline, solid, tint or raised, or one of the brand's own (deck brand <name> lists them). Without one: the diagram's card, else the card the brand maps its kind to, else default; a name the brand lacks is skipped.
countnumber1Particles travelling together.
speed"slow" | "normal" | "fast"normalHow fast they travel, as a multiple of the brand's motion.
size"sm" | "md" | "lg"mdHow big the dots are.
role"accent" | "positive" | "negative" | "fg"accentThe color role they travel in.
play"loop" | "once"loopLoop while the step is current, or play once and rest at the end.
colnumber—The grid column, from 1 on the left.
rownumber—The grid row, from 1 at the top.
colSpannumber1How many columns it covers.
rowSpannumber1How many rows it covers.

Components

Flow

Use when
Any system of boxes and arrows: an architecture, a request path, a pipeline. Place nodes with col/row (spans for wide nodes) or leave cells out for an automatic layout (layout, direction).
Limits
nodes 12, edges 16, columns 5, maxColumns 7, rows 3, maxRows 4, maxNodes 60, maxEdges 120, maxParticles 24, maxGridIndex 64, maxStep 999, labelChars 18, labelLines 2, titleLines 3, minBreakChars 3
A slide that uses <Flow>: Every drop crosses five systems on its way to a rider.
lookbook / diagram-architecture
PropTypeDefaultDescription
colsnumber—Columns the grid has at least; the cells used decide otherwise.
rowsnumber—Rows the grid has at least.
layout"layered" | "tree" | "force" | "radial"layeredThe automatic layout used when no node has a grid cell.
direction"right" | "down" | "left" | "up"rightWhich way an automatic layout flows.
cardstring—The card (a node style the brand defines) for all its nodes: default, outline, solid, tint or raised, or one of the brand's own (deck brand <name> lists them). A node's own card wins.
childrenReactNode—<Node>, <Group>, <Edge>, <Packet>, <Journey>, <State> and <Focus> elements.

Also takes the shared props align, id, title and height.

Example

<Flow title="Checkout request path">
  <Node id="web" kind="client" title="Web app" col={1} row={1} />
  <Node id="api" kind="service" title="Orders API" col={2} row={1} />
  <Node id="db" kind="database" title="Orders DB" col={3} row={1} />
  <Edge from="web" to="api" label="HTTPS" />
  <Edge from="api" to="db" label="SQL" />
  <Journey at={1} path="web api db" back />
</Flow>

Node

Goes in
<Flow>, <Group>, <Tree> (nested in its parent <Node>) or <Cycle>
Use when
A box in a <Flow>, <Tree> or <Cycle>. kind sets its shape and icon; icon overrides it ("none" drops it).
Limits
titleLines 3
A slide that uses <Node>: Every drop crosses five systems on its way to a rider.
lookbook / diagram-architecture
PropTypeDefaultDescription
widthnumber—Preferred width in canvas pixels, reduced to fit the region.
heightnumber—Minimum height in canvas pixels; grows to fit the text.
idrequiredstring—The id edges and packets name it by.
titlestring—The name on the node; the id when left out. Wraps at word boundaries.
subtitlestring—A second, quieter line, such as Postgres 16.
badgestring—A small status pill on a corner of the node, such as 503: the top right unless an edge runs there, then the first free corner.
childrenReactNode—In a <Tree>, its child <Node>s; elsewhere content of your own instead of the title and subtitle.

Also takes the shared props kind, state, at, icon, card, col, row, colSpan and rowSpan.

Example

<Node
  id="db"
  kind="database"
  title="Orders DB"
  subtitle="Postgres 16"
  col={4}
  row={2}
/>

Group

Goes in
<Flow> or another <Group>
Use when
A labelled container (a VPC, a region, "Client side"): nest the nodes in it; it wraps them, or takes its own col/row/colSpan/rowSpan.
A slide that uses <Group>: Every drop crosses five systems on its way to a rider.
lookbook / diagram-architecture
PropTypeDefaultDescription
strokeWidthnumber—The outline width in canvas pixels; zero hides it.
idstring—Its id; made from the label when left out.
labelrequiredstring—The label in its top-left corner, such as VPC.
childrenReactNode—The <Node>s and inner <Group>s inside it.

Also takes the shared props lineStyle, at, col, row, colSpan and rowSpan.

Example

<Group label="Production VPC">
  <Node id="api" kind="service" title="API" col={2} row={1} />
</Group>

Edge

Goes in
<Flow> or <Cycle>
Use when
A connection between two nodes; to equal to from draws a small loop on the node (a retry). In a <Cycle>, an <Edge> between consecutive stages labels or styles that arc.
Limits
labelChars 18, labelLines 2
A slide that uses <Edge>: Every drop crosses five systems on its way to a rider.
lookbook / diagram-architecture
PropTypeDefaultDescription
idstring—Its id, for <State edge>; from->to when left out.
fromrequiredstring—The node it starts at.
torequiredstring—The node it ends at; the same node as from draws a small loop on it, such as a retry.
labelstring—Text beside the line, such as HTTPS. Wraps after about 18 characters to two lines, then is cut with an ellipsis.
dashedbooleanfalseA dashed line, for asynchronous or optional links.
asyncbooleanfalseAnother name for dashed.
route"orthogonal" | "straight" | "curved"orthogonalHow it runs between its nodes.
arrow"end" | "start" | "both" | "none"endWhere arrowheads go.
bidirectionalbooleanfalseArrowheads at both ends; arrow="both".
fromSide"top" | "right" | "bottom" | "left"—The side of from it leaves by.
toSide"top" | "right" | "bottom" | "left"—The side of to it enters by.
flowboolean | number | { count, speed, size, role, reverse }—Continuous traffic along it: true, a particle count, or the details.

Also takes the shared props strokeWidth, lineStyle, at and state.

Example

<Edge from="api" to="db" label="SQL" />
<Edge from="worker" to="worker" label="retry" />

Packet

Goes in
<Flow> or <Cycle>
Use when
Traffic along edges on a step: from/to or a multi-hop path, at (plays while that step is current) and until (to keep playing), reply for out, pause and back. Loops by default; play="once" rests at the end. from = to rides a self loop.
A slide that uses <Packet>: Every change reaches the merchant within a second, or is retried until it does.
lookbook / diagram-events
PropTypeDefaultDescription
fromstring—The node it starts at.
tostring—The node it travels to; from again rides a self loop.
pathstring | string[]—Several hops instead of from and to: node ids in order.
labelstring—A short tag that rides with it, such as GET /cart.
replyboolean | string—Come back after a pause at the far end: true, or the response's tag.

Also takes the shared props at, until, count, speed, size, role and play.

Example

<Packet from="web" to="api" at={2} label="POST /orders" reply="201" />

Journey

Goes in
<Flow>
Use when
A request travelling hop by hop, one hop per step: path with back for the response, or <Hop> children with their own labels and replies; focus dims everything off the path; travelled edges stay lit (trail); pace="trip" plays the whole path on one step.
A slide that uses <Journey>: Every drop crosses five systems on its way to a rider.
lookbook / diagram-architecture
PropTypeDefaultDescription
idstring—Its id.
atnumber1The step of the first hop; later hops take the steps after it.
pathstring | string[]—The nodes it passes through: one hop per pair.
backbooleanfalseCome back along the path afterwards, one hop per step.
pace"hop" | "trip"hophop gives each hop its own step; trip plays the whole path on at.
focusbooleanfalseDim everything off the path while it plays.
trailbooleantrueKeep travelled edges lit.
childrenReactNode—Explicit <Hop>s, instead of path.

Also takes the shared props count, speed, size, role and play.

Example

<Journey at={1} path="browser cdn gateway orders db" back focus />

Hop

Goes in
<Journey>
Use when
One hop of a <Journey>, with its own tag and reply.
A slide that uses <Hop>: A drop's trip from shop to door, hop by hop.
lookbook / diagram-hops
PropTypeDefaultDescription
fromstring—The node it starts at.
tostring—The node it travels to.
pathstring | string[]—Several nodes in one hop, instead of from and to.
atnumber—Its step; the step after the previous hop's when left out.
labelstring—A tag that rides with the packet.
replyboolean | string—Come back after a pause: true or the response's tag.
returningbooleanfalseDraw it as a reply on its way back.

Also takes the shared props count, speed, size, role and play.

Example

<Hop from="api" to="db" label="SELECT" reply="12 rows" />

State

Goes in
<Flow> or <Cycle>
Use when
Change a node or an edge from a step on: is="highlighted", "error", "success", "muted" or "default", with a badge.
A slide that uses <State>: Every change reaches the merchant within a second, or is retried until it does.
lookbook / diagram-events
PropTypeDefaultDescription
nodestring—The node it changes.
edgestring—The edge it changes, by id (from->to unless it has its own).
isrequired"default" | "highlighted" | "muted" | "error" | "success"—The emphasis it sets from at (to until).
badgestring—A badge to show meanwhile, such as Timeout.
atnumber0The step it applies from.

Also takes the shared props until.

Example

<State node="payments" at={3} is="error" badge="Timeout" until={5} />

Focus

Goes in
<Flow> or <Cycle>
Use when
Dim everything but some nodes (and the edges between them) for a range of steps.
A slide that uses <Focus>: Every change reaches the merchant within a second, or is retried until it does.
lookbook / diagram-events
PropTypeDefaultDescription
nodesrequiredstring | string[]—The nodes that stay lit, such as "web api db".
atnumber0The first step it applies on.

Also takes the shared props until.

Example

<Focus at={4} nodes="api queue worker" />

SequenceDiagram

Use when
Who calls whom, in order: a protocol, an API handshake, a retry. <Actor>s across the top, <Message>s top to bottom; the current message animates.
Limits
actors 6, messages 10
A slide that uses <SequenceDiagram>: A drop is booked, batched and handed over in 52 minutes.
lookbook / diagram-sequence
PropTypeDefaultDescription
cardstring—The card (a node style the brand defines) for all its nodes: default, outline, solid, tint or raised, or one of the brand's own (deck brand <name> lists them). A node's own card wins.
childrenReactNode—<Actor>s, then <Message>s in order.

Also takes the shared props align, id, title and height.

Example

<SequenceDiagram title="Charging once">
  <Actor id="web" kind="client" title="Web app" />
  <Actor id="api" kind="service" title="Payments API" />
  <Message from="web" to="api" label="POST /charges" at={1} />
  <Message from="api" to="web" label="201 Created" reply at={2} />
</SequenceDiagram>

Actor

Goes in
<SequenceDiagram>
Use when
A participant of a <SequenceDiagram>, drawn as a node over its lifeline.
A slide that uses <Actor>: A drop is booked, batched and handed over in 52 minutes.
lookbook / diagram-sequence
PropTypeDefaultDescription
widthnumber—Preferred width in canvas pixels, reduced to fit the region.
heightnumber—Minimum height in canvas pixels; grows to fit the text.
idrequiredstring—The id messages name it by.
titlestring—Its name; the id when left out.
subtitlestring—A quieter second line.

Also takes the shared props kind, icon and card.

Example

<Actor id="api" kind="service" title="Payments API" />

Message

Goes in
<SequenceDiagram>
Use when
An arrow between lifelines; reply for a response, async for fire-and-forget, from = to for a call to itself.
A slide that uses <Message>: A drop is booked, batched and handed over in 52 minutes.
lookbook / diagram-sequence
PropTypeDefaultDescription
fromrequiredstring—The actor it leaves.
torequiredstring—The actor it reaches; the same as from for a call to itself.
labelstring—What it says, such as POST /orders.
atnumber—The step that reveals it; it plays while that step is current.
replybooleanfalseA response: a dashed arrow, its packet a ring.
asyncbooleanfalseAn asynchronous message: a dashed arrow.

Also takes the shared props strokeWidth, lineStyle, play and state.

Example

<Message from="web" to="api" label="POST /charges" at={1} />

Timeline

Use when
Milestones in time order, with where we are now: a roadmap, a migration, a history. The line fills up to the latest milestone shown, or the one marked current.
Limits
milestones 6
A slide that uses <Timeline>: Open Network went from beta to launch in 12 weeks.
lookbook / diagram-timeline
PropTypeDefaultDescription
childrenReactNode—The <Milestone>s, in time order.

Also takes the shared props align, id, title and height.

Example

<Timeline title="Migration">
  <Milestone date="Q1" title="Split checkout" at={1}>Orders live</Milestone>
  <Milestone date="Q2" title="Move payments" at={2} current />
</Timeline>

Milestone

Goes in
<Timeline>
Use when
One milestone of a <Timeline>: date, title and a short line of detail as children.
A slide that uses <Milestone>: Open Network went from beta to launch in 12 weeks.
lookbook / diagram-timeline
PropTypeDefaultDescription
daterequiredstring—When, as it should read: Q1 2026, March.
titlerequiredstring—What happens, in a few words.
currentbooleanfalseMarks where we are now; once revealed it stays current over later milestones.
childrenReactNode—A short line of detail under the title.

Also takes the shared props at, state and icon.

Example

<Milestone
  date="Q3 2026"
  title="Region cells"
  at={3}
  current
>
  EU and US apart
</Milestone>

Layers

Use when
A stacked architecture or ownership map: <Layer> bands top to bottom, each with <Item> chips.
Limits
layers 6, itemsPerLayer 6
A slide that uses <Layers>: Merchants touch one layer; riders another.
lookbook / diagram-layers
PropTypeDefaultDescription
cardstring—The card (a node style the brand defines) for all its items: default, outline, solid, tint or raised, or one of the brand's own. An item's own card wins; the bands keep the stack's look unless a <Layer> names a card.
childrenReactNode—The <Layer>s, top to bottom.

Also takes the shared props align, id, title and height.

Example

<Layers title="Platform">
  <Layer title="Edge" subtitle="Platform team" at={1}>
    <Item kind="gateway" title="API gateway" />
  </Layer>
</Layers>

Layer

Goes in
<Layers>
Use when
One band of a <Layers> stack. While the stack is built, the band its at step adds is picked out; once the last band is in, only bands with state stand out, so mark the band the stack is about with state="highlighted".
A slide that uses <Layer>: Merchants touch one layer; riders another.
lookbook / diagram-layers
PropTypeDefaultDescription
titlerequiredstring—The layer's name, such as Data.
subtitlestring—What it does or who owns it.
cardstring—The card its band is drawn with: default, outline, solid, tint or raised, or one of the brand's own; without one the band keeps the stack's look (a tint with a bold left edge).
childrenReactNode—Its <Item>s.

Also takes the shared props at and state.

Example

<Layer title="Data" subtitle="Data team" at={4}>
  <Item kind="database" title="Postgres" />
</Layer>

Item

Goes in
<Layer>
Use when
One building block in a <Layer>, as a chip with its kind’s icon.
A slide that uses <Item>: Merchants touch one layer; riders another.
lookbook / diagram-layers
PropTypeDefaultDescription
titlerequiredstring—Its name.

Also takes the shared props kind, icon, state and card.

Example

<Item kind="queue" title="Kafka" />

Cycle

Use when
A loop of stages that repeats: an incident loop, a feedback cycle, an agent loop. steps walks it one stage per step; spin keeps a packet circling; an <Edge> between consecutive stages labels that arc.
Limits
stages 8
A slide that uses <Cycle>: A hub's day is one loop, run 56 times.
lookbook / diagram-cycle
PropTypeDefaultDescription
stepsbooleanfalseWalk the loop one stage per step.
spinbooleanfalseKeep a packet circling while the slide is on screen.
cardstring—The card (a node style the brand defines) for all its nodes: default, outline, solid, tint or raised, or one of the brand's own (deck brand <name> lists them). A node's own card wins.
childrenReactNode—The stages as <Node>s in order from the top, plus <Edge> (to label or style an arc), <State>, <Packet> and <Focus>.

Also takes the shared props align, id, title and height.

Example

<Cycle title="Incident loop" steps>
  <Node id="detect" title="Detect" />
  <Node id="respond" title="Respond" />
  <Node id="learn" title="Learn" />
  <Edge from="learn" to="detect" label="new alert" />
</Cycle>

Tree

Use when
A hierarchy: an org chart, a decision tree, a module tree. Nest <Node>s; direction down or right; at on a node reveals its branch.
Limits
nodes 12, leaves 7, depth 4
A slide that uses <Tree>: Test one tap to confirm the handoff.
lookbook / opportunity-experiments
PropTypeDefaultDescription
direction"down" | "right"downWhich way it grows.
cardstring—The card (a node style the brand defines) for all its nodes: default, outline, solid, tint or raised, or one of the brand's own (deck brand <name> lists them). A node's own card wins.
childrenReactNode—One root <Node>, with its children nested inside it.

Also takes the shared props align, id, title and height.

Example

<Tree title="Pricing rules">
  <Node id="price" kind="decision" title="Price?">
    <Node id="zone" title="Zone" />
    <Node id="weight" title="Weight" at={1} />
  </Node>
</Tree>

Svg

Use when
A drawing someone made (a floor plan, a product sketch, an exported figure): inlined and cleaned at build time (no scripts, event handlers or external references), it takes brand colors (recolor, or data-fill/data-stroke on shapes), reveals elements by id per step (steps) and can draw its strokes on (draw).
A slide that uses <Svg>: Three loops cover the Old Town from one hub.
lookbook / diagram-svg
PropTypeDefaultDescription
srcrequiredstring—In MDX a relative path to an .svg file, inlined at build time; in TSX the markup (?raw import).
titlerequiredstring—What the drawing shows, for people who cannot see it.
stepsRecord<string, number>—Elements to reveal by step, by id: {{ dock: 1, sorting: 2 }}.
drawbooleanfalseDraw the strokes of each element on as it is revealed.
recolorRecord<string, SvgRole>—Colors in the file to replace with color roles: {{ "#ff5a1f": "accent" }} (svgRoles).

Also takes the shared props height.

Example

<Svg
  src="../assets/floor.svg"
  title="The warehouse floor"
  steps={{ inbound: 1, sorting: 2 }}
  recolor={{ "#e4572e": "accent" }}
  draw
/>

Node kinds, states, edges and cards

Node kinds (19)

kindShapeIcon (lucide / tabler)Use when
servicecardserver / server-2An application service or API you run: orders API, auth service, a backend.
databasealso dbcylinderdatabase / databaseA database or any system of record: Postgres, DynamoDB, a ledger.
queuealso stream buspipelist-ordered / list-numbersA queue, stream or event bus: SQS, Kafka topic, a job queue.
cachestackzap / boltAn in-memory cache in front of something slower: Redis, Memcached, an edge cache.
storagealso bucketcardarchive / bucketObject or file storage: an S3 bucket, a blob store, a file share.
useralso personpilluser / userA person: a customer, an operator, a reviewer. Usually where a journey starts.
clientalso browser web appwindowapp-window / browserA browser or desktop client: the web app, a single-page app, a CLI on a laptop.
mobilealso phonedevicesmartphone / device-mobileA mobile app or device.
cloudsoftcloud / cloudA managed platform or the internet as a whole: a CDN, a cloud provider, "the web".
externalalso third-partydashedglobe / worldA system outside your boundary that you call or that calls you: Stripe, a partner API.
functionalso lambda workerchamferlambda / lambdaA serverless function or a worker that runs on demand: Lambda, a cron job.
gatewayalso proxyhexagonnetwork / networkAn API gateway, reverse proxy or ingress that routes requests inward.
loadbalanceralso lb load-balancerhexagonsplit / arrows-split-2A load balancer that spreads traffic over several instances.
agentdoublebot / robotAn AI agent: the loop that plans, calls tools and talks to a model.
llmalso modeldoublesparkles / sparklesA language model endpoint: the model an agent or a feature calls.
toolcardwrench / toolA tool an agent can call: search, code execution, a calendar API.
documentalso filefoldedfile-text / file-textA document, file, report or prompt: a PDF, a config file, a knowledge base page.
decisiondiamondnoneA yes/no branch in a process; keep its title to a short question.
nodealso genericcardnoneAnything else: give it an icon from the brand set, or children of your own.

States

StateAlso accepted
default—
highlightedhighlight
mutedmute dim dimmed
errorfail failed failure
successok done recover recovered

Edge options

label

What travels on the edge (HTTPS, SQL, publish); it sits beside the line, never on a node. Wraps after about 18 characters.

<Edge from="api" to="db" label="SQL" />
dashed / async

An asynchronous, optional or eventual link (events, replication, fire-and-forget).

<Edge from="orders" to="events" async />
lineStyle / strokeWidth

Vary an ordinary connector's line pattern or width in canvas pixels.

<Edge from="checkout" to="dispatch" lineStyle="dotted" strokeWidth={3} />
route: orthogonal | straight | curved

orthogonal (the default) routes around nodes with rounded corners; straight runs centre to centre; curved bends gently between ports.

<Edge from="a" to="b" route="curved" />
arrow: end | start | both | none

Where arrowheads go; bidirectional is arrow="both".

<Edge from="agent" to="model" bidirectional />
fromSide / toSide

Force the side an edge leaves or enters by (top, right, bottom, left) when the router picks another.

<Edge from="api" to="cache" fromSide="top" toSide="bottom" />
self loop

An edge whose from and to are the same node draws a small loop on it, such as a retry; a packet from and to that node rides it.

<Edge from="worker" to="worker" label="retry" />
flow

Continuous traffic along an edge while it is shown: flow, flow={5} or flow={{ count, speed, size, role, reverse }} (see edgeFlow).

<Edge from="orders" to="bus" label="publish" flow={{ count: 3 }} />
at / state / id

Reveal the edge at a step, start it in a state, or name it for <State edge="...">.

<Edge id="auth" from="api" to="idp" at={2} />

Cards (card="...")

A node's card is, in order: its own card; its diagram's card; the card the brand maps its kind to (diagram.kinds in brand.ts); default. A name the brand does not have is skipped (the next in that order applies) and the node carries data-card-missing with the name asked for; every node carries data-card with the card it uses.

CardLook, unless the brand restyles it
defaultThe brand's node: its node fill and border, the icon in a bordered tile.
outlineNo fill, the node border only.
solidFilled in the accent, no border, text in the accent foreground.
tintThe accent at a low opacity with an accent border and a filled icon tile.
raisedThe surface fill, a hairline border and the brand's medium shadow.

Every brand has the five standard cards and may restyle them or define more of its own (deck brand <name> lists them). Stick to the standard names for a deck that should look right in any brand.

  • States still win over the card: highlighted, error and success recolor the outline and show the halo, muted and a focus dim the node.
  • On <Layers> the items follow the stack's card; the bands keep the stack's own look unless a <Layer> names a card.
  • Pick a card for a reason (a role, a group of nodes that belong together), not per node at random: one or two cards on a slide besides the default.

The same lists, as JSON, are in deck diagrams --json.

Type to search…

↑↓ navigate↵ selectEsc close