---
title: "diagram"
description: "A title that states what the diagram shows (\"Every checkout crosses four hops\"), then one diagram filling the space under it."
---

> Documentation Index
> Fetch the complete documentation index at: https://sandrinodm.github.io/deckster/llms.txt
> Use this file to discover all available pages before exploring further.

# diagram

Use the `diagram` layout when one diagram is the slide: an architecture, a request path, a sequence of calls, layers, a cycle or a tree. The title states what the diagram shows, the diagram fills the space under it, and an optional `<Aside>` column says what to notice.

## Example

[Live slide: "A drop is booked, batched and handed over in 52 minutes", slide 117 of the lookbook deck](https://sandrinodm.github.io/deckster/decks/lookbook/#/diagram-sequence)

`decks/lookbook/slides/diagram-sequence.mdx`:

```mdx
---
layout: diagram
title: A drop is booked, batched and handed over in 52 minutes
eyebrow: One drop in time
budget: 1m30s
---

<SequenceDiagram title="One same-hour drop from booking to handover: the shop, Open Network, Flock, the rider and the recipient">
  <Actor id="shop" kind="client" icon="shopping-bag" title="Shop" />
  <Actor id="api" kind="gateway" title="Open Network" />
  <Actor id="flock" kind="function" title="Flock" />
  <Actor id="rider" kind="mobile" icon="bike" title="Rider" />
  <Actor id="recipient" kind="user" title="Recipient" />
  <Message from="shop" to="api" label="POST /v1/drops" at={1} />
  <Message from="api" to="shop" label="201, door 09:24" reply at={2} />
  <Message from="api" to="flock" label="Drop waiting" async at={3} />
  <Message from="flock" to="flock" label="Batch in 90 s" at={4} />
  <Message from="flock" to="rider" label="Loop of 9" at={5} />
  <Message from="rider" to="recipient" label="Handover" at={6} />
</SequenceDiagram>

<Aside>
### 52 min

The median from booking to the door for a same-hour drop, October 2026.
</Aside>

<Notes>
`diagram` with a `<SequenceDiagram>`, one `<Message>` per step and an `<Aside>`; use it when the order of the calls is the point.
Here is a same-hour drop as a sequence in time. [click] The shop books it. [click] Open Network answers at once with the time it will be at the door. [click] The drop waits for Flock. [click] Within 90 seconds Flock batches it into a loop. [click] The loop goes to a rider with nine stops. [click] And the rider hands it over. Booking to door is 52 minutes at the median; our loaf took 39.
</Notes>
```

The title is the finding, with its number (52 minutes), not the name of the system. Each `<Message>` arrives at its own step, so the diagram builds as you talk, and the `<Aside>` holds the one figure the room should keep: a heading and a sentence.

## When to use it

- **One diagram carries the point.** The body slot is required and holds one diagram component: `<Flow>` (nodes, edges, packets and journeys), `<SequenceDiagram>`, `<Timeline>`, `<Layers>`, `<Cycle>`, `<Tree>` or an `<Svg>`. `deck diagrams` lists them.
- **The title says what it shows.** Up to 90 characters: "Every checkout crosses four hops", not "Checkout architecture".
- **What to notice is short.** The `<Aside>` takes a `###` heading and a sentence, or up to three bullets, within 40 words. The `<Footnote>` takes up to 30.
- **You can reveal it in parts.** Bring in nodes, edges and messages with `at` steps instead of adding text to the slide.

When the diagram needs a paragraph beside it, use [`split`](https://sandrinodm.github.io/deckster/reference/layouts/split/). For data rather than structure, use the [`chart`](https://sandrinodm.github.io/deckster/reference/layouts/chart/) layout.

## Reference

Frontmatter: `layout: diagram`; surface: the deck's default; title: required, 90 characters at most; PowerPoint: title-only slide.

A title that states what the diagram shows ("Every checkout crosses four hops"), then one diagram filling the space under it: `<Flow>` (nodes, edges, packets, journeys), `<SequenceDiagram>`, `<Timeline>`, `<Layers>`, `<Cycle>`, `<Tree>` or an `<Svg>` (`deck diagrams` lists them). Fill `<Aside>` with what to notice, in a sentence or a few bullets, to set it in a column beside the diagram. Use split when the diagram needs a paragraph beside it.

*Slide still (a lookbook slide in this layout, not the example below): A slide in the diagram layout: Every drop crosses five systems on its way to a rider.* [Open the slide](https://sandrinodm.github.io/deckster/decks/lookbook/#/diagram-architecture)

**Slots**

| Slot | Required | Takes | Budget | What goes in it |
| --- | --- | --- | --- | --- |
| `body` | yes | diagram, component | — | One diagram component, nothing else; it fills the region. Write the takeaway in `title:`, and reveal or animate parts with `at` steps instead of extra text. |
| `<Aside>` | no | text, bullets | 40 words, 3 bullets | What to notice beside the diagram: a ### heading and a sentence, or up to three short bullets. |
| `<Footnote>` | no | text | 30 words | A source or caveat on the bottom line, in a sentence or two. |

**Frontmatter fields**

| Field | Values | How to use it |
| --- | --- | --- |
| `eyebrow` | text | Write a few words of at most 40 characters, for example `eyebrow: Budget committee`, or leave it out. |
| `chrome` | `true` (default), `false` | Write `chrome: false` to hide the page number, logo and progress bar on this slide, or `chrome: true` to show them. |

**Example**

```mdx
---
layout: diagram
title: Every checkout crosses three hops
eyebrow: Request path
---

<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" subtitle="Postgres" 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>

<Notes>
Step through the hops: the request goes out, the rows come back.
</Notes>
```

## Common mistakes

**A fourth bullet in the aside.** The aside takes up to three bullets. A fourth is a `content-budget` error:

```console
$ deck lint launch-review
decks/launch-review/slides/checkout.mdx
  error   content-budget (checkout): The aside slot holds 4 bullets; its layout allows 3.
          Fix: Cut it to the essentials, split the slide, move detail into speaker notes, or pick a layout made for more content (`deck layouts`).

launch-review: 1 error, 0 warnings in 1 slide (1 step checked).
```

Keep the point the title does not already make, and move the rest into the `<Notes>`.

**A second diagram, or text, in the body.** The body slot accepts any component, so `slot-content` checks neither the kind of block there nor how many there are (only a bulleted list is still reported). Keep it to one diagram yourself; the explanation goes in the aside, the notes or a `split` slide.

**Diagram problems.** The `diagram-*` rules check the drawing itself (nodes or labels drawn on top of each other, text smaller than the brand's caption and label sizes, more than 12 nodes or 16 edges at once). [Lint rules](https://sandrinodm.github.io/deckster/reference/lint-rules/) lists them with their fixes. `few-builds` warns when too few of a deck's chart, diagram and code slides build in steps ([lint](https://sandrinodm.github.io/deckster/review/lint/) has the threshold): stage the diagram with `at`.

## Related layouts

- [`split`](https://sandrinodm.github.io/deckster/reference/layouts/split/): a paragraph or bullets beside the diagram, when the text matters as much.
- [`chart`](https://sandrinodm.github.io/deckster/reference/layouts/chart/): the same frame for a chart, number or table.
- [`steps`](https://sandrinodm.github.io/deckster/reference/layouts/steps/): a process in order, written as numbered steps rather than drawn.
- [`timeline`](https://sandrinodm.github.io/deckster/reference/layouts/timeline/): three to five dated milestones from the frontmatter, without writing a component.

How to draw each diagram is on [flow diagrams](https://sandrinodm.github.io/deckster/data-and-diagrams/flow-diagrams/) and [sequence, timeline, layers, cycle and tree](https://sandrinodm.github.io/deckster/data-and-diagrams/sequence-timeline-layers-cycle-tree/).

Source: https://sandrinodm.github.io/deckster/reference/layouts/diagram/index.mdx
