JB logoMuke JBengineer · founder
Book a call
BLOG
Next
engineering · Nov 25, 2026

Building Multi-Step Product Demos That Play in the Page

How to build animated product demos — a quote written, sent, accepted on a client's phone and paid; a pupil admitted and a mark synced while the internet is down — as React state and CSS, not videos or screenshots. The state-plus-script model, the Stageshow kit, pages that cross-fade, why every change needs a cause, values that move instead of swapping, framing a product shot, closing a multi-beat loop, filming every frame with a gate, and the bento grid under it all. Drawn from two real landing pages: Outpost and Nexus School.

A field guide to animated product demos built in code — from two real landing pages, Outpost (a service-business workspace) and Nexus School (offline-first school software). Every snippet is real code from those apps, with its original comments.


What we are building

Two landing pages, the same idea on both.

On Outpost, a "from a first contact to a paid invoice" section plays three demos: a contact is added; a quote is written, sent, and accepted on the client's phone; the accepted quote becomes an invoice and is paid by Mobile Money. They look like the real app, but they are not videos, GIFs or screenshots.

On Nexus School, the hero is a desktop app in which a pupil is admitted, the internet drops on its own, a fee is receipted anyway, a mark is corrected on a record that already existed, and then the connection comes back and the fourteen changes held on that computer sync. Five beats, about sixteen seconds, looping.

Both are React components that draw a small version of the product and play a script against it. Why build them in code instead of recording the screen?

  • They stay sharp at any size, in light or dark, on any density.
  • They are tiny next to a video, and they load with the page.
  • They show only what matters — real words on the things the story is about, grey placeholder lines for everything else, so a visitor reads the story, not a cluttered screen.
  • They change with the product. Change a label in code and the demo updates; no re-recording.

The one idea

A demo is not an animation. It is a reducer with a cursor on top.

There is one state object describing the whole scene. There is one async function that walks the cursor around and mutates that state. React renders the state. The cursor is a real element whose position is animated toward measured DOM rectangles.

That inversion is what makes a five-beat story tractable. Think of it as an animation and you hand-keyframe twenty transitions, where every change to the story breaks six of them. Think of it as state and a beat is three lines:

await a.move("collect"); // walk the cursor to the button
await a.click(); // press it
await a.set({ collect: true }); // the app reacts

The framework is the Stageshow kit (a Claude Code skill by Benji Taylor) — a Stage component, an Act script API, and a set of parts (Window, Phone, Field, Roll, Collapse, States) that get the fiddly geometry right. It is copied into the repo rather than installed, because a product shot is design work and you will edit it. Benji's article puts the whole standard in one sentence, and it is worth keeping in mind whenever something looks "almost right":

It reads as a real product, simplified to what the viewer needs, framed with intent, and every motion has a cause.

If you are building this from scratch, the three pieces you cannot skip are:

  1. A scene state type — one plain object, not refs scattered around.
  2. A script runner that resolves after paint — so you can measure the DOM between beats.
  3. Target measurement — data-target="save-pupil" on an element, a.move('save-pupil') in the script. Never hard-coded coordinates. The moment you hard-code, the narrow layout breaks silently.

The tools and skills

Tool or skillWhat it did here
StageshowThe kit of React parts (Stage, Window, Phone, Field, Button, Collapse, Roll, States, Badge), the framing and motion rules, the gold examples, and scripts/film.mjs. Install with npx skills add benjitaylor/skills --skill stageshow.
grit-ui-uxThe standard for customer-facing pages: research the pattern first, no made-up numbers or logos, motion that has a reason, check the page at 1440 and 375 wide.
agent-browserDrives a real browser to open the page, scroll each demo into view, wait for it to play, and screenshot at desktop and phone width. Not the same job as film.mjs: film.mjs films a faux stage on a dev server; agent-browser logs into the live product.
dribbble-reference-harvesterCollects design references before a screen is built.

The most important is Stageshow, so most of this is about it.


A demo is state plus a script

A Stageshow demo has three pieces: a state object (everything that can change on screen), a render function that draws the screen from that state, and a script — an async function that changes the state over time and moves a fake cursor. The Stage component runs it all:

<Stage
  width={720}                 // the design size; it scales down to fit, never up
  height={440}
  compact={{ below: 600, width: 358, height: 470 }}   // a separate phone design
  initial={initial}           // the state the script starts from
  poster={poster}             // the state shown with reduced motion, and the resting frame
  script={script}             // the story
  play="once"                 // play when it scrolls into view, then stay on the result
  cursor={{ at: { wide: { x: 660, y: 420 }, compact: { x: 330, y: 450 } }, idle: 1200 }}
  className="look-outpost"
>
  {(s, rect, layout) => /* draw the screen from state s */}
</Stage>

layout is "wide" or "compact", so one render function draws the desktop window or the phone.

The script API

The script gets an Act object. These are the calls the demos use:

await a.wait(700); // pause, in milliseconds
a.put({ page: "form" }); // change state now
await a.set({ lifted: false }); // change state and wait for transitions to settle
await a.click("new"); // move the cursor to data-target="new" and press it
await a.click({ at: "d1", x: 0.3, y: 0.5 }); // press at 30% across, 50% down that target
await a.move("invoice"); // move the cursor there without pressing
await a.type("client", "Lakes", { interval: 80 }); // type into state.client, one char at a time
await a.key("Enter"); // a real keypress beat
a.mark("send"); // name a moment, for filming and debugging

The cursor finds things by data-target and changes shape by data-cursor:

<Button variant="primary" data-target="send" data-cursor="pointer">
  Send to client
</Button>
<Field value={s.d1} box={{ "data-target": "d1", "data-cursor": "ibeam" }} />

Never hard-code where things are. The kit measures the real element, so the cursor still lands on the button after you change the layout or the font.


More than three steps, in one window

The common question is how to show more than three steps — "create a quote, send it, convert it to an invoice, get paid", or "admit a pupil, go offline, receipt a fee, correct a mark, sync". Three ideas work together.

Idea 1: pages share one place and cross-fade

Each "page" of the app is drawn all the time, stacked in the same spot. Only the current one is visible. Switching pages is just changing state.page:

<div className="of-pages">
  <div className="of-page" data-on={s.page === "list" || undefined}>
    {" "}
    {/* the list */}{" "}
  </div>
  <div className="of-page" data-on={s.page === "form" || undefined}>
    {" "}
    {/* the form */}{" "}
  </div>
  <div className="of-page" data-on={s.page === "quote" || undefined}>
    {" "}
    {/* the quote */}{" "}
  </div>
</div>

The CSS fades the old page out quickly and settles the new one in with a small upward move. The two overlap, so there is never an empty frame between pages:

.of-page {
  position: absolute;
  inset: 0;
  opacity: 0;
  translate: 0 8px;
  visibility: hidden;
  /* leaving: fast */
  transition:
    opacity 0.24s ease,
    translate 0.24s ease,
    visibility 0s linear 0.24s;
}
.of-page[data-on] {
  z-index: 1;
  opacity: 1;
  translate: 0 0;
  visibility: visible;
  /* arriving: starts 40ms in, so the two overlap */
  transition:
    opacity 0.3s ease 0.04s,
    translate 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.04s,
    visibility 0s;
}

Keep every page mounted for two reasons: a page that leaves needs to exist while it fades (mounting and unmounting cannot animate out), and the cursor needs every data-target in the DOM to measure the button on the page it is about to open. The discipline that makes this safe: target names are unique across the whole stage — add / save-pupil / name belong to the Students page, collect / receipt / amount to Fees — so the script can never aim at a control on the page it is not on. Nexus uses the kit's States part for the same cross-fade:

<States
  value={s.page}
  states={{ students: <Students state={s} />, fees: <Fees state={s} /> }}
/>

Idea 2: one state object for the whole story

All the steps share one state type. Every visible fact about the scene is a field on it. Here is Nexus's:

type Page = "students" | "fees";
type Link = "online" | "offline" | "syncing";
 
type S = {
  page: Page;
  link: Link;
  form: boolean; // the admission form
  typed: string; // what has been typed into it
  added: boolean; // the new pupil, once saved
  collect: boolean; // the fee dialog
  amount: string;
  receipted: boolean;
  editing: boolean; // the mark being corrected on a pupil already there
  mark: string;
  waiting: number; // changes saved on this computer and nowhere else
  sent: number;
};

typed and amount are strings in state. The cursor types into state one character at a time and Field renders whatever is there. There is no real input element and no focus management.

A bug worth learning from. Outpost's first phone used a state key called client for "is the phone showing". The form already used client for the client's name. Typing "Lakes" into the field made client a non-empty string, which counts as true, so the phone appeared on the first page. Give every piece of state its own name, and read your state type top to bottom before adding to it.

Idea 3: the script tells the story in beats

Read the shape before the detail: every beat is move → wait → click → set → wait. Here is the middle of Nexus's five-beat script:

/* 1 — A pupil is admitted, while the connection is still up. */
await a.move("add");
await a.wait(180);
await a.click();
await a.set({ form: true });
await a.wait(320);
await a.click("name");
await a.type("typed", NEW_PUPIL, { interval: 52 });
// Inside the button, off its label — so the frame that shows the press
// does not hide what was pressed.
await a.move({ at: "save-pupil", x: 0.85, y: 0.66 });
await a.wait(160);
await a.click();
await a.set({ form: false, added: true });
await a.wait(700);
 
/* 2 — The internet goes. Nothing was pressed. */
await a.set({ link: "offline", waiting: 12 });
await a.wait(850);
 
/* 4 — And an existing record is changed, not just added to. */
await a.move({ at: "mark", x: 0.78, y: 0.5 });
await a.click();
await a.set({ editing: true, mark: "" });
await a.wait(200);
await a.type("mark", "76", { interval: 150 });
await a.key("Enter");
await a.set((s) => ({ editing: false, waiting: s.waiting + 1 }));

Several decisions in there are deliberate, and all of them are reusable:

  • a.set() resolves after paint. That is the contract that makes everything work — the next a.move('receipt') measures a button that exists, in the place it actually landed. If your runner resolves before paint you will chase off-by-eight-pixel cursor bugs forever.
  • move, then wait(160), then click. A cursor that arrives and presses in the same frame reads as a teleport. A sixth of a second of hover is the difference between "a hand did this" and "a script did this".
  • Press inside the button, off its label. A target can be a name (aimed at centre), a name with x/y as fractions of its box, or a raw point. Dead-centre hid the word "Admit" on the exact frame that shows the press; x: 0.85, y: 0.66 keeps the press inside the control and the label visible.
  • Functional set for anything cumulative. waiting is incremented from three different beats. Writing waiting: 13 literally is how you get a counter that disagrees with itself the first time you reorder the story.
  • Typing is state, one character at a time. interval is ms between characters: 52ms for a name, 46ms for an amount, and 150ms for a two-digit mark correction — a correction is deliberate, and typing 76 at 46ms is a blur rather than a decision.
  • a.key('Enter') is a real beat. It draws the keycap and resolves as the key comes up, which is the instant an app would react — how you commit an inline edit without a form.

Beat 4 is an update, not an insert. Three beats that all add a row read as one claim repeated. The interesting claim — "it syncs changes to records that already exist" — needs a beat where a value that was 64 becomes 76. If your stages are create, create, create, you have one stage. Beat 2 has no cursor. The internet going is the only thing in the story nobody chooses — and it is the whole product. A beat the cursor does not cause is how you say "this happens to you" rather than "you click here".

Rule of thumb: three to five beats, ten to sixteen seconds, and a payoff that holds on screen long enough to read.

Chaining the steps across demos

Outpost's three demos are separate components, but they tell one story, so each ends where the next begins: the contact demo rests on "New quote" on Sarah's page; the quote demo rests on "Turn into invoice"; the invoice demo starts on that accepted quote and clicks it. Same client, same contact, same amounts, same quote number — a visitor scrolling down sees one continuous piece of work. Separate demos are easier to read than one long one; if you need one long demo, use more pages in Page and keep the whole script under about 25 seconds.


Every change needs a cause

This is the part most demos get wrong, and the part that makes the biggest difference once fixed. In Outpost's first version, after "Send", the quote's status simply turned "Viewed", then "Accepted". Nothing on screen caused it. A status that changes by itself reads as fake.

The fix is the laptop-and-phone pattern: the client's phone rises over the corner of the window, the client taps "Accept quote", the phone drops away, and only then does Outpost update.

.of-client {
  position: absolute;
  left: 434px; /* 720 - 24 - 262: a full 24px gutter on the right */
  top: 118px; /* its foot runs off the bottom of the stage */
  opacity: 0;
  translate: 0 380px;
  transition:
    translate 0.45s cubic-bezier(0.4, 0, 1, 1),
    opacity 0.25s ease 0.2s; /* leaving */
}
.of-client[data-show] {
  opacity: 1;
  translate: 0 0;
  transition:
    translate 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease; /* arriving */
}

Two details matter:

  • The phone runs off the bottom. A phone shown whole, floating with space all round it, looks pasted on. Cropped by the edge, it looks like it is in the scene.
  • Cause first, then the effect, each with its own moment. If the status changed while the phone still covered the window, the viewer would miss it. The phone leaves, then Outpost shows "Accepted".

Values that change without jumping

Numbers and labels that change are where demos look cheap. Content that changes must move, not swap — a figure that cuts from 0 to 450,000 between two frames is the clearest possible tell that nothing real happened. The kit has three parts for this; use the right one.

PartUse it forExample
RollText that changes in place — animates only the part that changed and eases its width, so neighbours slide instead of jumping.The quote total UGX 4,500,000 → 5,100,000; the status pill Sent → Viewed → Accepted.
StatesA control with several states that should keep its largest size, so nothing around it moves.The phone's button, "Accept quote" → "✓ Accepted".
CountA number whose digits roll like an odometer.Pipeline column totals.
<Badge tone={accepted ? "success" : "accent"} dot>
  <Roll variant="fade">{s.status}</Roll>
</Badge>
<span className="of-money">
  <Roll variant="fade" align="end">{`UGX ${money(s.sum)}`}</Roll>
</span>

Numbers roll (the digits move); words fade (variant="fade"), because rolling letters reads as a slot machine. Lessons from the filming:

  • Give a pill one width. "Sent", "Viewed", "Accepted" are different lengths, so the badge kept resizing. .ss-badge { min-width: 92px; justify-content: center; } fixed it.
  • Use Count only for numbers that count. Rolling an invoice's amount due from 5,100,000 down to 0 drew a long strip of digits and stranded "UGX" far from the "0". Use Roll for that.
  • Non-breaking space between currency and number (UGX ${n}): inside the kit's animated text a normal space can collapse to nothing, showing as "UGX5,100,000".
  • The total updates once, after the price is finished, not on every keystroke — updating per digit made the numbers jump (a filming fix).

Framing — what separates a product shot from a screenshot

More demos fail on framing than on motion. The rules Nexus's hero is built to:

.nx .ss-stage {
  --gutter: 26px;
  overflow: hidden;
  background: transparent;
}
/* Pinned, bottom bleed. A 460px-tall window on a 420px stage. */
.nx-app {
  position: absolute;
  left: 120px;
  top: var(--gutter);
  width: 494px;
  height: 460px;
  box-shadow: var(--ss-shadow-hero);
}

The window is 40px taller than its frame on purpose, and what runs off the bottom is the filler rows, never the action. That single decision is most of the difference between a product shot and a screenshot in a box. The short version:

  • No plate. The page is the ground. A tinted card behind a hero makes it float.
  • Bleed one gutter, or well past it. Halfway is an accident.
  • Only filler bleeds. What the story happens to stays whole.
  • Windows keep their shape. You crop a window; you never resize it to fit.
  • No dead corners. An empty quarter is unfinished, not calm — which is what a satellite card (a second small object straddling an edge) is for.

A companion rule lives on the page, not the stage: the figure keeps its design size and overflows its column to the right, where the page already clips, because scaling a 640px stage down into a 540px column takes its 11px type to 9px — where a demo stops being readable. compact is a redesign, not a squeeze: below 560px the stage switches to a 358×340 design with a narrower sidebar and a moved rest point, not the desktop shrunk.


The poster frame

Most people never see the animation. They see a thumbnail, a reduced-motion render, or they scroll past before the loop reaches the interesting part. So you pick the one frame that tells the story alone and declare it. It is not the first frame and not the last — it is the frame with the result still on screen:

// Offline, a fee receipted, and the count of what this computer is holding.
const POSTER: S = {
  ...initial,
  page: "fees",
  link: "offline",
  added: true,
  receipted: true,
  amount: FEE,
  mark: "76",
  waiting: 14,
};

Stage renders it under prefers-reduced-motion, so the accessibility path and the thumbnail path are the same code.


Real words are a budget

Count the real strings in Nexus's hero: 34 pupils on the roll, Term 1 · 18 unpaid, Online/Offline/Syncing, two pupil names, UGX 450,000, Paid, Students, Fees, two button labels. Everything else is a grey bar, with widths that vary (70, 56, 64, 48), never uniform:

{
  [70, 56, 64, 48].map((w, i) => (
    <div key={i} className="nx-row">
      <Bar w={22} h={22} r={11} tone={2} />
      <Bar w={w} h={7} tone={3} />
      <Bar w={26} h={16} r={5} tone={1} />
    </div>
  ));
}

The instinct is to fill every row with plausible text. Resist it. The more real detail there is, the more it looks generated — and the eye has nowhere to land. Words go on the three or four things the story is about; everything else is structure. And the detail that sells it: the register holds Ugandan teaching staff with their actual subjects, not Lorem or "User 1". A specific claim about a real morning beats a plausible one every time.


Closing a multi-beat loop — the hardest part of the whole job

A three-beat demo can usually get away with a fade. A five-beat demo in which four pieces of work have been completed cannot. Nexus's loop originally ended await a.set({ ...initial }), which is wrong in a way worth spelling out:

It put a whole five-beat story back in a single frame — the new pupil out of the list, the receipt un-issued, the corrected mark back to 64 — with nobody touching anything. A frame in which four completed pieces of work silently undo themselves does not read as a loop restarting; it reads as the sync having rolled the school back, which is the precise fear this hero exists to answer.

The fix was already in the composition. The demo has two pages, the cursor already walks between them, and a page swap is exactly the overlap a reset needs — the new page's content arrives as the old page's leaves, so nothing is ever blank. So each half of the state is put back while the page that does not show it is on screen:

await a.move("nav-fees");
await a.click();
await a.set({ page: "fees" });
// Behind the swap: the Students page's own work, not on screen.
await a.set({ added: false, typed: "", mark: initial.mark, sent: 0 });
await a.wait(900);
await a.move("nav-students");
await a.click();
await a.set({ page: "students" });
// And behind this one: the fee, which Students does not show.
await a.set({ receipted: false, amount: "", collect: false });

The general rule: a loop ends where it began, or it resets with a visible cause. The mechanisms, in order of preference:

MechanismWhen it works
Reset behind a view changeThe demo has more than one screen
A second scene that is the resetA dashboard where a new period starts
The thing closing or being dismissedA dialog, a notification, a popover
The screen going to sleepA phone
a.snap(patch) — transitions offLast resort, and only off-screen

Nexus's phone demo uses the fourth, in two lines — the screen goes back to sleep: await a.set({ arrived: true }); await a.wait(4200); await a.set({ arrived: false }).


Filming every frame

A still cannot show you a pop. You will look at a demo twenty times and not see that a value snaps, that the cursor covers what it presses, or that the loop seam undoes four pieces of work. The eye smooths over exactly the faults a viewer will notice, because you already know what is supposed to happen. So you film it and read the frames.

Stageshow ships a Playwright-driven script at ~/.claude/skills/stageshow/scripts/film.mjs (it needs playwright-core and a Chromium). The invocations that earn their keep:

# The preview server, which finds every example
npm run dev
 
# A contact sheet of the whole loop, with the gate's verdict. Always --gate.
node scripts/film.mjs "http://127.0.0.1:5173/?capture=outpost-quote" --out quote.png --gate
 
# At phone width, which uses the compact design
node scripts/film.mjs "http://127.0.0.1:5173/?capture=outpost-quote" --width 390 --gate
 
# Every frame of a single press, six times slower — reach for this when
# something feels wrong and you cannot see why.
node scripts/film.mjs http://localhost:3000 --slow 6 --every 40 --zoom target:save-pupil
 
# What a reduced-motion user sees — is your poster frame actually right?
node scripts/film.mjs http://localhost:3000 --reduced --still

--gate is the verdict: it ends rehearsal passed only when every never-intentional line is at 0, otherwise prints the count and exits 1 — so it drops into CI. It checks things like: does a value change without moving, does the cursor cover what it presses, does an element snap to whole pixels while its neighbour glides, does a window float with air on four sides, does the loop seam change anything without a cause. A demo is not finished until both runs end with rehearsal passed. Build in the skill's examples/ folder first, where the preview and filming work; move it into your app once it passes.

The faults the checks caught, across both projects, and the fixes:

What the check saidWhat was wrongThe fix
jump: span "5" y -23.1px in one frameThe total updated on every typed digit.Update it once, after the price is finished.
covers: the cursor sits on "Save contact" as it pressesThe cursor hid the label it was pressing.Click off-centre: a.click({ at: "save", x: 0.86, y: 0.7 }).
framing: div.ss-phone ends 12px short of the right edgeNeither a full gutter nor cut off.Move it to leave a full 24px gutter.
near-empty frames: content falls to 10 of 231A rolling total made of dozens of digit strips dropped the count on a page change.Show the total with Roll; overlap the crossfade more.
small text: renders at 9.1px on a phoneThe phone design was the desktop shrunk.Set compact type sizes (14–15.5px).
ss-window__heading width -25.7px in one frameThe window title snapped between "P5 Blue · Students" and "· Fees".Hold the title constant; the heading inside the body rolls instead.
half-pixel glyph: a 13px svg sits on a half pixelA 13px icon in a 14px box blurs.Use 12px or 14px icons in even boxes.

Read the contact sheet as well as the verdict — the checks miss things a person sees at once. Nexus's phone-on-the-first-page bug passed every check; only looking at the frames showed it.

Be honest about what you leave standing

The gate does not pass on the Nexus hero, and that is written into the file. Three outcomes are all legitimate — fix it, argue with it in writing, or accept it because the real product does the same thing — and what is not legitimate is a finding nobody looked at. Two worth copying:

framing: runs only 11px past the right edge. Unresolved, and the arithmetic disagrees: the window is 494px at left 120 on a 640px stage, so its right edge is 26px inside — the gutter. The measurement is most likely the shadow's reach being clipped. A check that disagrees with the arithmetic gets investigated, not obeyed.

uneven inset: ss-notification__icon — iOS centres the icon against a two-line body, so its top/bottom insets exceed its left. That is what iOS does. The alternative is a one-line body, and no school's results message fits in one line.


Putting the demos in a Next.js page

The kit is plain React and CSS, so copy it in rather than installing it:

apps/web/components/stageshow/kit/      <- the kit, copied as it is
apps/web/components/landing/demos/      <- your demos, their CSS, the shared look

Mark the demo files as client components and point the import at your path:

"use client";
import {
  Badge,
  Bar,
  Button,
  Collapse,
  Field,
  Phone,
  Roll,
  Stage,
  States,
  Window,
  type Act,
} from "@/components/stageshow/kit";
import "./look.css";

Things we hit moving them in:

  • Remove what you don't use — the kit bundles brand logos via new URL(..., import.meta.url); we dropped the logos and BrandMark rather than bundle them.
  • Check icon names — the kit's Icon knows a short list; an unknown name type-checks but draws nothing. Import others from lucide-react directly.
  • Leave the kit out of your linter so you can refresh it by copying it again ("!apps/web/components/stageshow/kit" in biome.jsonc).

Give the demos your product's look by mapping your tokens onto the kit's --ss-* properties — never reshape a kit part's geometry from outside:

.look-outpost .ss-stage {
  --ss-accent: #3e5c76;
  --ss-accent-soft: #e6edf3;
  --ss-font: "Inter", system-ui, sans-serif;
  --ss-radius-md: 8px;
  --ss-radius-window: 14px;
}

And the theme follows the page — a light window on a dark page reads as a screenshot pasted in from somewhere else:

function usePageTheme(): "light" | "dark" {
  const { theme } = useTheme();
  return theme === "dark" ? "dark" : "light";
}

Watch for clashing attribute names

This cost real debugging time. Outpost's landing page reveals sections on scroll by hiding anything with data-reveal until it is on screen. The kit's Collapse also uses data-reveal, so the page's rule found the kit's rows and hid them, and the phone-width demos played with empty screens. The fix is to make the page skip anything inside a stage, in both the CSS and the observer:

.reveal-on [data-reveal]:not(.ss-stage *):not(.is-in) {
  opacity: 0;
  transform: translateY(1.25rem);
}
const els = Array.from(
  document.querySelectorAll<HTMLElement>("[data-reveal]")
).filter((el) => !el.closest(".ss-stage"));

If your page has its own animation system, search the kit for the attributes it uses before mounting a demo.

The section around each demo, and checking it

Each demo sits in a two-column block — sentences on one side, demo on the other — with maxWidth: width so the frame never stretches past its design, role="img" + aria-label so a screen reader gets the sentences instead of a fake app, and min-w-0 on the grid column so a wide demo does not push the page sideways on phones. Then check it in a real browser, after it has played, at both widths:

agent-browser set viewport 1440 900
agent-browser open "http://localhost:3002/"
agent-browser eval "document.querySelector('#send-a-quote .ss-fit').scrollIntoView({block:'center'})"
agent-browser wait 22000
agent-browser screenshot quote-desktop.png
agent-browser set viewport 375 812
agent-browser eval "document.documentElement.scrollWidth"   # should be 375

One honest gap: accessibility

The static bento pictures below are correctly aria-hidden. The Stage demos are not — Stage hides only its decorative ground layer, so "34 pupils on the roll", "Grace Auma" and "UGX 450,000" are exposed to assistive tech as ordinary text, read in an order nobody composed. The fix is two attributes on the wrapper, and it is what to do before copying this pattern:

<div
  className="ns-hero-figure"
  role="img"
  aria-label="The Nexus desktop app: a pupil admitted, a fee receipted offline,
                 and fourteen changes syncing when the connection returns."
>
  <NexusHero />
</div>

One sentence describing what the picture shows, in place of a scrambled reading of its filler. aria-hidden on the whole figure is also defensible for a purely decorative demo; leaving it as raw text is not.


The bento grid

Under each section is a grid of tiles: a small picture of part of the product, then a title and a line or two. A bento is one picture made of tiles — a grid where every tile is a cropped window reads as generated however good each window is. So the composition is planned before any tile is built, as a table, and checked against a few questions: how many tiles are UI (about a third to a half); which is the hero (exactly one — the widest on the first row); does any tile sit next to the same kind as itself (dense alternates with calm, across and down); does any real string appear twice (none should); and window chrome appears at most once in the whole grid — four sets of browser traffic lights is four times the same signal.

The grid, with the load-bearing lines

.ns-bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.ns-bento-tile {
  position: relative;
  overflow: hidden; /* the tile owns the crop */
  padding: 26px;
  border-radius: 26px;
  min-height: 300px;
}
  • Six columns, not twelve — six divides into 4+2 and 3+3, every layout this grid needs, and makes an illegal span obvious.
  • minmax(0, 1fr), not 1fr — without it, a tile containing something wider than its share refuses to shrink and blows the row out. This is the single most common bento bug.
  • overflow: hidden on the tile, every picture drawn too big — the tile owns the crop; the picture does not try to fit. Copy sits at the top of every tile without exception; mixed copy positions make a grid look assembled rather than composed.

The composition is declared as data, and a typo'd id fails the build instead of rendering an empty tile:

const TILES: Tile[] = [
  { id: "seminars", span: 4, tone: "lav" },
  { id: "__price", span: 2, tone: "green" },
  { id: "lab", span: 3, tone: "blue" },
  // ...tones never repeat next to each other, across or down
];

Content comes from one source, presentation from the grid: the names, prices and summaries live in data.ts because llms.txt and the pricing page read them too, so a price exists in exactly one place.

The pictures, drawn past the tile edge

The pictures are small React components in the app's own Tailwind classes, so they match the product and switch with dark mode. Each shows one idea, cropped to the part that matters, with a strip at the bottom whose only job is to be cut:

{
  /* A browser whose content stops neatly above the floor is a screenshot
    in a box; one that carries on past it is a page. */
}
<div className="ns-site-cards">
  <span />
  <span />
  <span />
</div>;

A stat tile is one real number at display size (font-size: 46px, white-space: nowrap on the figure and its unit together so the unit never floats off on its own line), and it sits directly under the copy — a stat pinned to the bottom of a tall tile with a void above it reads as missing content, not as calm. When a tile needs to move, put one Stage per tile at its native width inside a flex: none box of the same width (never wrap the whole grid in one Stage — a 1000px grid in a 630px column draws 15px titles at 9.5px), and give motion one place to lead.

The border light and the scroll reveal

A soft light travels once round a tile's border as it arrives, and keeps going on hover — a conic-gradient on a masked ::before, with a registered @property --edge-angle so the angle animates:

@property --edge-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.tile-edge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--edge-angle),
    transparent 0 68%,
    color-mix(in oklab, var(--accent) 75%, transparent) 84%,
    transparent 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
}
.tile-edge:hover::before {
  opacity: 1;
  animation: edge-round 3.5s linear infinite;
}

The demo frames use the same tile-edge class, so the demos and the bento feel like one design.

For the reveal there are two approaches. Nexus uses pure CSS scroll-driven animation, with the opacity-0 start state inside @supports so a browser without animation-timeline gets the content simply there, not a blank page:

@supports (animation-timeline: view()) {
  .ns-reveal {
    animation: ns-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
}
@keyframes ns-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
  }
}

Outpost uses an IntersectionObserver that adds reveal-on to the page before anything hides — so without JavaScript, or with reduced motion, everything is simply there. Either way: never leave an element at opacity 0 waiting for a script that may not run. The failure mode of the naive reveal is a blank marketing page.


Build it in this order

The order is most of the value — a framing fault makes every motion fault invisible, so fixing motion first is wasted work.

  1. Write the beat list in prose. Three to five beats, one payoff, name what can be left out. If you cannot write it in six lines you do not have a story yet.
  2. Pick the medium and size. ~720×340 for a hero beside copy, 900–1100 full-width, ~400×300 for a card. Design at the size it will be seen, show it 1:1, never under ~320 wide.
  3. Map the product's real tokens — accent, radii, type scale, greys. Half the realism comes from here.
  4. Copy the closest working example and keep its bones — its stage size, crop, row heights and beat structure are all tuned. A copy that only changes the name is not done.
  5. Frame it, and film one still before any motion. If the still is empty, flat or boxed, no animation will save it.
  6. Count the real strings. Three to seven. Budget them.
  7. Build the screen with measurable targets — data-target on everything the cursor touches; never a hard-coded coordinate.
  8. Choreograph. Keep what appears mounted and toggle it so exits animate. Overlap beats. Hold the payoff.
  9. Set the poster first. It is the frame most people will ever see.
  10. Film the loop with --gate, at the shown width and at 390. Read every frame. Fix the largest visible fault first — framing, then hierarchy, then motion, then polish.
  11. Write down what you left standing and why, next to the component.

The faults that come back every single time

FaultThe rule
A value swaps instead of movingRoll for numbers, Roll variant="fade" for words
Grey bars where the eye landsFiller at the edges; words on the subject
A plate behind the window, or a window floating with air on four sidesThe page is the ground; bleed past at least one edge
Empty bands, cut controls, clipped shadowsThe crop takes filler, never the action
Stock-AI tells: sparkles, purple, a letter in a coloured squareUse the product's own mark and icons
A long hold, then a reset with no causeEnd where you began, or reset behind a view change
A selection that is not under the I-beamMeasure the caret from the pointer, every frame
A hand-drawn status bar or home indicatorLet the kit draw device chrome
A stat's unit wrapping to its own linewhite-space: nowrap on figure and unit together
A tile's picture slicing itself and leaving a blank stripOne Stage per tile, at its native width

And the two specific to multi-step demos:

  • Every added stage makes the loop seam worse. Plan the reset when you add the fourth beat, not after.
  • Every added screen is another set of target names. Keep them globally unique and keep both screens mounted, or the cursor will aim at a control that is not there.

If you only remember four things

  1. State, not keyframes. One object, one async script, targets measured from the DOM. Every beat is move → wait → click → set → wait.
  2. Nothing changes without a cause, including the loop. A value moves, it never swaps; a reset happens behind a view change, a dismissal or a second scene — never in a frame where nobody touched anything.
  3. Frame it before you animate it. Crop hard, bleed past an edge, let the page be the ground, and spend your real words on the three things the story is about.
  4. Film it, read every frame, and write down what you left standing. You cannot see these faults by looking, and the note beside the component is what stops the next person re-fixing a decision.

References

  • Benji Taylor, "Stageshow" — benji.org/stageshow. The article behind the skill: the five ways faux UI fails (too much, too little, boxed, flat, bland), framing, motion with a cause, the laptop-and-phone pattern.
  • The Stageshow skill — npx skills add benjitaylor/skills --skill stageshow. Inside it: kit/ (the React parts and CSS), scripts/film.mjs (the gate), and the references that decide code — framing.md, craft.md, motion.md, bento.md, kit.md, rehearse.md, verify.md. Read framing.md, then craft.md, then motion.md, in that order: framing decides whether the shot works at all, craft whether it looks real, motion whether it looks alive.
  • Gold examples to copy from — hero-demo (five beats, a satellite), choreography (content changing in place), payout-flow (slow overlapping arrivals, no cursor), subscriptions (a second scene that is the reset), device-pair (a laptop and a phone telling one story); and for grids, bento, ruled-bento, staggered-bento.
  • The Grit skills — grit-ui-ux (craft standard, anti-slop audit) and agent-browser.
  • Web platform — CSS scroll-driven animations (animation-timeline: view()), @supports, prefers-reduced-motion, will-change, CSS Grid minmax(), @property, mask-composite, conic-gradient. The kit's only runtime deps are React 19 (its flushSync is what lets the script paint between beats) and lucide-react; everything else is plain CSS. For filming: playwright-core plus a Chromium.