Status tracker
A row of small blocks, one per day or run, coloured and shaped by status, with the share that went well. Use it for uptime on a status page or the history of a build. For a year of daily amounts, use the calendar heatmap.
Install
npx shadcn@latest add @thrum-pro/status-trackerThis is a Pro component. The command works once your project has a licence key: set up Pro or see pricing.
Data shape
type StatusTrackerBlock = {
label: string; // day or run
status: "ok" | "warn" | "alarm" | null; // null = not recorded
detail?: string; // one more line
};[
{ label: "1 Dec", status: "ok" },
{ label: "2 Dec", status: "warn", detail: "14 min degraded" },
{ label: "3 Dec", status: null },
{ label: "4 Dec", status: "alarm", detail: "41 min outage" },
]Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | readonly StatusTrackerBlock[] | Required | One block per period or run, oldest first. |
label | string | Required | What is tracked. Shown above the blocks, and used as the cursor's name and the table caption. |
words | Partial<Record<"ok" | "warn" | "alarm", string>> | Default Operational, Degraded, Outage | The word for each status, in the readout, the legend and the data table. A block with no status is always “No data”. |
summary | boolean | Default true | Show the share of recorded blocks that are ok, such as “99.2% uptime”. Blocks with no status are left out of it. |
summaryLabel | string | Default "uptime" | The word after the share. |
legend | boolean | Default true | Show the four block shapes with their words under the row. |
locale | string | Default "en-US" | Locale for the share. |
onActiveChange | (index: number | null) => void | – | Called with the index of the block under the cursor, or null when the cursor leaves. |
sound | boolean | Default true | Play a tick as the cursor moves between blocks, if the visitor has sound on. |
emptyLabel | string | Default "No data" | Text shown when there are no blocks. |
className | string | – | Merged onto the root. It fills the width it is given. |
Motion and sound
Motion
- First draw: the blocks fade in as a wave, oldest first, 250 ms each and 300 ms apart at most from first to last.
- The cursor ring and the readout follow the pointer on a stiff spring.
- Reduced motion: the row appears complete, and the cursor moves at once.
Sound
- A soft tick each time the cursor lands on a different block, at most one every 40 ms.
Sound is off until the visitor turns it on. Pass sound={false} to keep this component silent. How sound works
Accessibility
- The row is one tab stop, exposed as a slider whose value text is the block under the cursor, for example “2 Dec: Degraded, 14 min degraded”.
- A visually hidden table carries every block with its status and detail, with the label as its caption.
- Status is shape as well as colour: ok is a solid block, warn is hatched, alarm is split in two, and no data is an empty outline. The legend shows each shape with its word.
- Blocks are at least 4 px wide. When they do not fit, the row scrolls sideways inside itself and opens on the latest block; the pointer target is the whole row.
- The readout is a floating surface. Under frosted glass it turns translucent and keeps its text at 4.5:1.
| Keys | Action |
|---|---|
| Tab | Focus the row. The cursor goes to the latest block. |
| ← → | Move the cursor one block, scrolling it into view. |
| Home / End | Jump to the oldest or the latest block. |
| Esc | Hide the cursor. |
Source
The source comes with Pro
TypeScript source · Copy-paste ready · MIT-compatible for client projects · Includes all dependencies
Files and dependencies
- Adds
components/ui/status-tracker.tsx- Packages
motion- Brings along
- Chart foundationsMotion tokensSound engineChart tooltip
Changelog
- 1.0.0 · 2026-12-03First release.