Loading component…
Loading component…
An agent carrying a job from one place to another like a flight on its way – where it comes from, where it goes, the time left and a bar its pixel mark rides on
To reuse this local React demo, copy all files from the Code tab into the same folder, then import RunTransit from ./run-transit.
import { RunTransit } from "@/components/ui/run-transit";
<RunTransit
title="Customer migration"
from={{ code: "Postgres", label: "prod-eu-1" }}
to={{ code: "Supabase", label: "eu-central-1" }}
progress={0.62}
eta={5 * 60_000}
agent={{ id: "migrator", name: "Migrator" }}
onAction={() => openRun()}
/>| Name | Type | Default | Description |
|---|---|---|---|
| from / to | { code: string; label?: string } | Where the job comes from and where it goes – a large name and a muted line under it | |
| progress | number | How far it is, 0 to 1 | |
| eta | number | Time left in ms – shown in the pill while it runs | |
| took | number | How long it took in ms – shown in the pill once it's done | |
| status | "running" \| "paused" \| "done" \| "failed" | "running" | Running sweeps a light over the bar; paused rests; done fills it; failed turns it pink |
| agent | { id: string; name: string } | The agent doing it – its id picks the pixel mark that rides at the head of the bar | |
| title | string | "Run Transit" | Heading on the frame |
| icon | ReactNode | A small mark before the title – defaults to a route, in cyan | |
| actionLabel / onAction | string / () => void | "Open" | The button on the top right – it shows when onAction is given |
| className | string | Extra class on the root |
Built on a container query; under 360px the names get smaller and the card tighter
Long names end in an ellipsis and show in full on hover
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"