Skip to content

demo

A title that states what the audience is about to watch, then one large region for a live 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

lookbook / demo-liveOpen full deck
decks/lookbook/slides/demo-live.tsxtsx
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>
  );
}

Slide 136 of the lookbook deckView on GitHub

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.

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.
apps-demo / agentOpen in the deck

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. For a terminal session or code that changes, use 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 · Live components · 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 · 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.

A slide in the demo layout: One command opens the waiting drops.
A lookbook slide in this layout, not the example belowlookbook / command-palette

Slots

SlotTakesBudgetWhat goes in it
bodyrequiredcomponent—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>text, bullets34 words, 3 bulletsUp 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>text30 wordsA source or caveat on the bottom line, in a sentence or two.

Frontmatter fields

FieldValuesHow to use it
eyebrowtextWrite a few words of at most 40 characters, for example eyebrow: Budget committee, or leave it out.
chrometrue (default) falseWrite chrome: false to hide the page number, logo and progress bar on this slide, or chrome: true to show them.

Example

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

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

  • screen: one product screen, framed and still, with numbered callouts.
  • code: code, a <CodeMove> or a <Terminal> session instead of a running app.
  • split: a component beside a paragraph, when the text matters as much.
  • diagram: how the system works, drawn instead of run.

Type to search…

↑↓ navigate↵ selectEsc close