---
title: "demo"
description: "A title that states what the audience is about to watch, then one large region for a live demo."
---

> 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.

# demo

Use the `demo` layout to give a product demonstration the space under a one-line title, with room for up to three short notes beside it. The body can hold a mini app, a React widget or an authored demo that runs from the data in the slide.

## Example

[Live slide: "Price your own drops", slide 136 of the lookbook deck](https://sandrinodm.github.io/deckster/decks/lookbook/#/demo-live)

`decks/lookbook/slides/demo-live.tsx`:

```tsx
import type { ReactNode } from 'react';

import { Notes } from '@deckster/engine';
import { Live } from '@deckster/kit';

import { INITIAL_DROPS } from '../lib/price/plans.ts';
import { PriceCalculator, PriceSheet } from '../lib/price/price-calculator.tsx';

/**
 * Read by the build without running the slide, so it must stay a literal.
 */
export const frontmatter = {
  layout: 'demo',
  title: 'Price your own drops',
  eyebrow: 'Try it',
  budget: '1m',
};

/**
 * The drop price calculator, hosted inline in the slide's own React tree. Its poster is the same
 * sheet at the calculator's opening value, so exports and `?static` show what the room first sees.
 */
export default function DemoLive(): ReactNode {
  return (
    <>
      <Live
        component={PriceCalculator}
        label="A drop price calculator"
        poster={() => <PriceSheet drops={INITIAL_DROPS} />}
      />
      <Notes>
        `demo` from a TSX slide with a `&lt;Live&gt;` widget (a small React component in `lib/`) and
        a poster drawn from the same component; use it when the room should be able to touch the
        thing. Here is the price list as something you can move. At 600 drops a month, Open Network
        is the cheapest way to pay. [drag the slider past 950] Above about 950 drops, the hub
        plan&apos;s monthly fee pays for itself. Pay per drop is for shops that send a few drops a
        week. In the PDF you get the poster, at 600 drops.
      </Notes>
    </>
  );
}

/**
 * What to try, beside the calculator.
 */
export function Aside(): ReactNode {
  return (
    <ul>
      <li>Drag the slider, or click it and use the arrow keys</li>
      <li>Past 950 drops a month, the hub plan wins</li>
    </ul>
  );
}
```

This slide is a TSX file. The `<Live>` widget is the default export, its `poster` is drawn from the same component so exports show the calculator at its opening value, and the notes beside it are a named `Aside` export.

*Slide still: A demo slide titled An agent checks two sources, then answers, with a window called Ops console across the full width showing a chat request, two tool calls, the answer and a run trace.* [Open the slide](https://sandrinodm.github.io/deckster/decks/apps-demo/#/agent)

Without `<Aside>` the demo takes all twelve columns. With it, the demo takes eight and the notes the last four.

## When to use it

- **Something has to run in front of the room.** For a still screen, use [`screen`](https://sandrinodm.github.io/deckster/reference/layouts/screen/). For a terminal session or code that changes, use [`code`](https://sandrinodm.github.io/deckster/reference/layouts/code/).
- **The title says what to watch for**, in one line of up to 48 characters: "Watch Flock build a loop", not "Demo".
- **The body is one element.** Use `<AppFrame>` for a mini app or `<Live>` for a React widget. To stage a product or AI interaction from data in the slide, use `<CommandDemo>`, `<GroundedAnswer>`, `<ReviewDiff>` or `<RunTrace>`. Each has its own deck steps and stills for export. [Demo components](https://sandrinodm.github.io/deckster/reference/components/#product-and-ai-demonstrations) · [Live components](https://sandrinodm.github.io/deckster/write-slides/live-components/) · [Mini apps](https://sandrinodm.github.io/deckster/write-slides/mini-apps/)
- **Notes are a few words each.** `<Aside>` takes up to three bullets and 34 words. What you will say while it runs goes in `<Notes>`.
- **A source or caveat** goes in `<Footnote>`, up to 30 words.

The command palette example shows how to author the available commands and the output each one returns. [Live command palette](https://sandrinodm.github.io/deckster/decks/lookbook/#/command-palette) · [Presentation patterns](https://sandrinodm.github.io/deckster/examples/presentation-patterns/)

## Reference

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

A title that states what the audience is about to watch, then one large region for a live demo: an `<AppFrame>` (a mini app or an external page) or a `<Live>` widget, filling all the space under the title. CommandDemo, GroundedAnswer, ReviewDiff and RunTrace have scripted steps and built-in stills. Fill `<Aside>` with up to three short notes to set them in a narrow column beside the demo. Supply an explicit poster for AppFrame and networked Live widgets.

*Slide still (a lookbook slide in this layout, not the example below): A slide in the demo layout: One command opens the waiting drops.* [Open the slide](https://sandrinodm.github.io/deckster/decks/lookbook/#/command-palette)

**Slots**

| Slot | Required | Takes | Budget | What goes in it |
| --- | --- | --- | --- | --- |
| `body` | yes | component | — | One `<AppFrame>`, `<Live>`, `<CommandDemo>`, `<GroundedAnswer>`, `<ReviewDiff>` or `<RunTrace>`. It fills the region. The app must exist under decks/`<deck>`/apps/ (`deck new app`), or the build fails. Set what the audience should watch for in `title:` (one line). |
| `<Aside>` | no | text, bullets | 34 words, 3 bullets | Up to three short notes beside the demo: what to look at, as a few words each, in bullets or sentences. Anything longer belongs in speaker notes. |
| `<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: demo
title: "Watch the agent call two tools, then answer"
eyebrow: Live demo
---

<Live label="Where the live demo goes">

**The demo goes here.** Create a mini app with `deck new app <deck> <name>`, then replace this placeholder with `<AppFrame app="<name>" poster=... chrome="window" />`.

</Live>

<Aside>
- Tool calls appear as cards
- The answer streams in last
</Aside>

<Notes>
Say what to watch for before the demo starts, then let it run without talking over it.
</Notes>
```

## Common mistakes

- **A fourth note beside the demo.** `deck lint` holds `<Aside>` to its budget with the `content-budget` rule:

  ```console
  $ deck lint launch-review
  decks/launch-review/slides/demo.mdx
    error   content-budget (demo): 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).
  ```

- **An `<AppFrame>` without a `poster`.** Static mode, exports and offline runs show the poster, so leaving it out is a `schema` error: "`<AppFrame>` needs `poster`: What static mode, exports and offline runs show."
- **An app that does not exist.** `app="dispatch-sim"` needs `decks/<deck>/apps/dispatch-sim/index.html`. Without it, `deck lint` reports a `schema` error and tells you to run `deck new app <deck> dispatch-sim`.
- **Only an `<Aside>`.** The body is required: a slide with notes and no demo is a `schema` error, "The demo layout needs content outside its slot tags."

## Related layouts

- [`screen`](https://sandrinodm.github.io/deckster/reference/layouts/screen/): one product screen, framed and still, with numbered callouts.
- [`code`](https://sandrinodm.github.io/deckster/reference/layouts/code/): code, a `<CodeMove>` or a `<Terminal>` session instead of a running app.
- [`split`](https://sandrinodm.github.io/deckster/reference/layouts/split/): a component beside a paragraph, when the text matters as much.
- [`diagram`](https://sandrinodm.github.io/deckster/reference/layouts/diagram/): how the system works, drawn instead of run.

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