Skip to main content

ProcessReplay

Discovery

Cases replayed as tokens moving along the process map’s own transitions, with a time slider, play/pause, a speed select and a live in-flight case count.

import { ProcessReplay } from "@elabs-ai/components-process";
Install
npm install @elabs-ai/components-tokens @elabs-ai/components-ui @elabs-ai/components-process

Skipping the @source line is the most common first failure: Tailwind does not scan node_modules, so every component renders unstyled. The one-time wiring

Prompt for your coding agent

Paste it into Claude Code, Cursor, Codex or any other coding agent. Text in [brackets] is yours to fill in.

Add the brand-ui ProcessReplay component (from @elabs-ai/components-process) to this project.

1. Read https://elabs-ai.com/llms.txt first: it maps every package and the rules. If you can use MCP servers, connect https://elabs-ai.com/mcp and use its search, docs and tokens tools. If not, run the same lookups in the terminal: `npx -y @elabs-ai/components-cli search "<what you need>"` and `npx -y @elabs-ai/components-cli docs <Component>`.
2. Look ProcessReplay up before writing code: `npx -y @elabs-ai/components-cli docs ProcessReplay` prints its real props, variants, what it pairs with and what to avoid.
3. If @elabs-ai/components-process is not installed yet: `pnpm add @elabs-ai/components-tokens @elabs-ai/components-ui @elabs-ai/components-process` (or `npm install @elabs-ai/components-tokens @elabs-ai/components-ui @elabs-ai/components-process`). If this is the first brand-ui package in the project, wire it once: import `@elabs-ai/components-tokens/styles.css` plus the `themes/light.css` and `themes/dark.css` stylesheets in the CSS entry, add one Tailwind `@source` line per installed @elabs-ai package (Tailwind does not scan node_modules, so without it everything renders unstyled), and wrap the app root in `ThemeProvider` from `@elabs-ai/components-tokens`.
4. Use it here: [the screen or file, and what it should show]
5. Rules: use only @elabs-ai/components-* components and the semantic tokens — no raw colours, no raw font sizes, no arbitrary Tailwind values. Look up each component's real props with the docs tool before you use it; never guess a prop.
6. Done means: the typecheck passes, `npx -y @elabs-ai/components-cli audit src --strict` reports nothing, and you have opened the app and looked at every screen you touched in the light and the dark theme.

Examples

8 live examples

Playing

Playing from the start: the playhead advances and tokens move along edges. The test browser runs with reduced motion, where `defaultPlaying` is held, so the play function presses play the way a reader would.

Synchronized Start

Synchronized start: every case begins at t = 0, so all five tokens share the first edge.

Wall Clock

Wall-clock time: cases start on different days, so the readout shows dates.

Speed Control

The speed select and the time slider, driven from the keyboard.

Reduced Motion

Reduced motion: `defaultPlaying` is ignored — nothing moves until the reader presses play — and the ranked congestion list carries the whole reading in text.

Empty

A log with no cases.

Loading

No log yet.

API

ProcessReplay

PropTypeDescription
graphrequiredProcessGraphThe discovered graph to replay over.
logrequiredEventLogThe log the graph came from — tokens need per-case timing, not just the aggregate.
synchronizedStartbooleanAlign every case's start to `t = 0` instead of the wall clock. @default false
bucketMsnumberBucket width in ms for congestion. @default the log span / 300
metricProcessMetricSpecWhich readings the nodes and edges print. @default case frequency
directionFlowLayoutDirection@default "TB"
playingbooleanControlled playing state. Held while reduced motion is on until the reader presses play.
defaultPlayingbooleanInitial playing state when uncontrolled. Ignored under reduced motion. @default false
onPlayingChange(playing: boolean) => void
timenumberControlled playhead, ms relative to the timeline origin.
defaultTimenumber@default 0
onTimeChange(time: number) => void
speednumberControlled playback multiplier.
defaultSpeednumber@default 1
onSpeedChange(speed: number) => void
congestionLimitnumberHow many transitions the congestion list ranks. @default 5
loadingbooleanNo log yet. Renders the loading panel.
labelsPartial<ProcessReplayLabels>Override any user-visible string.

Also accepts: HTMLAttributes<HTMLDivElement>