Captain UI

Hero live

A landing hero whose product panel is a real agent run on a tape. It is already moving on the first frame; visitors can pause it, drag the timeline to rewind the work, or type to steer it.

npx shadcn@latest add @captain/hero-live
Pro

Watch it work. Grab it mid-run.

The run plays on a tape. Drag the timeline to rewind the agent's work, pause it, or type to steer it.
BuilderRunning

Checkout fails on CI about one run in eight. Find out why and fix it.

0:03.1

Usage

import { HeroLive } from "@/components/ui/hero-live"

<HeroLive
  title="Watch it work. Grab it mid-run."
  body="Drag the timeline to rewind the agent's work, or type to steer it."
  run={run}
  actions={<a href="/start">Start a run</a>}
/>

Props

PropTypeDefaultWhat it does
titleReactNodeThe headline. Keep it to two lines.
bodyReactNodeOne sentence under the headline.
actionsReactNodeYour primary button and perhaps a link.
runRunScript{ events, length, onSteer? }. Events are ask, think, tool and reply, each with at and end in ms.
startAtnumber3100Where the tape starts, so frame 0 is already mid-run.
agentstring"Agent"Name shown at the top of the panel.

Keyboard

Space / K
Pause or play (on the timeline)
← →
Back or forward 0.5s
Shift + ← →
2s
Home / End
Start or end of the run

Accessibility

  • The timeline is a role=slider whose value text reads the time, so the run can be stepped through by keyboard.
  • The play button names what it will do: pause, play or replay.
  • Typing in the steer box pauses the run so nothing moves while you write.
  • Reduced motion does not autoplay: it shows the finished run, and play and the timeline still work.