Skip to content
Thrum

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-tracker

This is a Pro component. The command works once your project has a licence key: set up Pro or see pricing.

Data shape

Type
type StatusTrackerBlock = {
  label: string;                          // day or run
  status: "ok" | "warn" | "alarm" | null; // null = not recorded
  detail?: string;                        // one more line
};
Sample
[
  { 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

PropTypeDefaultDescription
datareadonly StatusTrackerBlock[]RequiredOne block per period or run, oldest first.
labelstringRequiredWhat is tracked. Shown above the blocks, and used as the cursor's name and the table caption.
wordsPartial<Record<"ok" | "warn" | "alarm", string>>Default Operational, Degraded, OutageThe word for each status, in the readout, the legend and the data table. A block with no status is always “No data”.
summarybooleanDefault trueShow the share of recorded blocks that are ok, such as “99.2% uptime”. Blocks with no status are left out of it.
summaryLabelstringDefault "uptime"The word after the share.
legendbooleanDefault trueShow the four block shapes with their words under the row.
localestringDefault "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.
soundbooleanDefault truePlay a tick as the cursor moves between blocks, if the visitor has sound on.
emptyLabelstringDefault "No data"Text shown when there are no blocks.
classNamestring–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.
KeysAction
TabFocus the row. The cursor goes to the latest block.
← →Move the cursor one block, scrolling it into view.
Home / EndJump to the oldest or the latest block.
EscHide the cursor.

Source

SourcePro

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. 1.0.0 · 2026-12-03First release.

Loading index…

Keyboard shortcuts

/Ctrl KSearch components, docs and actions
?Show this list
AAppearance studio
SSound on or off
MFull or reduced motion
TTheme: auto, light, dark
GSurface: solid or frosted
BBackdrop photograph (under glass)
CCorner radius: square to round
RReplay the demo, on a component page
DDraw new data, on a component page
←→HomeEndMove the cursor in a focused chart
EscClose a dialog, or leave a chart cursor