Skip to content

Uptime Tracker for React

A React uptime tracker draws the status-page view of uptime: one block per day, build or check, each with its own tooltip. Pass data as readonly TrackerBlock[]: takes one block per period, oldest first.

npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/tracker-chart.json

API uptime, last 90 days

Operational: 82, Degraded: 4, Outage: 1, No data: 3

Use the arrow keys to read each block.

  • TrackerChart
  • TrackerTable
  • trackerToneColor
  • defaultTrackerStatuses
  • defaultTrackerChartLabels
  • +3 more

Uptime, last 90 days

Hover, tap and drag, or arrow through the days. Degraded days are striped, outages carry a caret, and the legend counts each status.

api.example.com

All regions

99.94% uptime

Operational: 82, Degraded: 4, Outage: 1, No data: 3

Use the arrow keys to read each block.

Files to copy

15 folders · 33 files · 4 packages
From theme/src/
  • components/charts/{tracker-chart.tsx, category-bar.tsx, chart-export-menu.tsx, chart-export.ts, chart-figure.tsx, chart-fit.tsx, chart-icons.tsx, chart-parts.tsx, chart-patterns.tsx, chart-pointer.tsx, chart-tip.tsx, chart-utils.ts, heatmap.tsx}
  • components/button/
  • components/charts/category-bar/
  • components/charts/chart-parts/
  • components/charts/heatmap/
  • components/drawer/parts/sheet.tsx
  • components/kbd/
  • components/menu/
  • components/skeleton/
  • components/spinner/
  • components/status-icons/
  • hooks/{use-controllable.ts, use-direction.ts, use-intersection.ts, use-latest.ts, use-magnetic.ts, use-media-query.ts, use-preferences.ts}
  • motion/{gate.ts, tokens.ts}
  • lib/{cn.ts, csv.ts, form.ts, glide-highlight.tsx, heading.ts, math.ts, popup-a11y.ts, popup-motion.ts, state-light.tsx, warn-once.ts}
  • styles/
shadcn CLI
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/tracker-chart.jsonRegistry item: tracker-chart. The styles need the Tailwind v4 glass UI setup.
Packages
pnpm add @base-ui/react clsx motion tailwind-merge

Next.js: samples here pass functions (formatters, seriesLegend, a dashboard's load), so put them in a file that starts with "use client".

A status page

One compact tracker per service, without legends, in a single glass card.

API99.98%

Operational: 29, Degraded: 1

Use the arrow keys to read each block.

Dashboard100%

Operational: 30

Use the arrow keys to read each block.

Webhooks99.71%

Operational: 27, Degraded: 2, Outage: 1

Use the arrow keys to read each block.

Custom statuses: CI builds

Any set of statuses, each with a palette slot or a status tone, an icon, and stripes or a caret as a second cue.

main · last 48 builds

Passed: 39, Failed: 4, Passed on retry: 4, Cancelled: 1

Use the arrow keys to read each block.

Props

PropTypeDefaultDescription
data (required)readonly TrackerBlock[]NoneTakes one block per period, oldest first.
statusesRecord<string, TrackerStatus>defaultTrackerStatusesSets the status definitions, keyed by status name.
heightnumber32Height of the blocks in px.
startLabelReactNodeNoneText under the first and last block, e.g. "90 days ago" / "Today".
endLabelReactNodeNoneCaption under the right end of the strip, e.g. "Today".
showLegendbooleantrueShow each status (icon, label and count) under the strip.
formatLabel((label: Date) => string)"Mar 3" in localeFormats Date / number labels.
localestring"en"Locale of the default formats.
emptyStateReactNodeNoneShown when there are no blocks.
labelsPartial<TrackerChartLabels>defaultTrackerChartLabelsEvery other string, for translation: labels={{ instructions: "…" }}; omitted keys keep the English of defaultTrackerChartLabels. All 7 keys of TrackerChartLabels are listed in the key table under the props table.
aria-label (required)stringNoneNames the strip for assistive tech (e.g. "API uptime, last 90 days").
classNamestringNoneAdds extra classes to the outer element.
TrackerChartLabels keys and English defaults (7)
Pass any key in labels; the rest keep the defaults of defaultTrackerChartLabels.
KeyEnglish default
instructionsUse the arrow keys to read each block.
count(status, count) => `${status}: ${count}`
periodPeriod
statusStatus
detailDetail
emptyNo data
showAll(rows) => `Show all ${rows} rows`

TrackerTable props

PropTypeDefaultDescription
data (required)readonly TrackerBlock[]NoneTakes one block per period, oldest first.
labelsPartial<TrackerChartLabels>defaultTrackerChartLabelsEvery other string, for translation: labels={{ instructions: "…" }}; omitted keys keep the English of defaultTrackerChartLabels. All 7 keys of TrackerChartLabels are listed in the key table under the props table.
localestring"en"Locale of the default formats.
statusesRecord<string, TrackerStatus>defaultTrackerStatusesSets the status definitions, keyed by status name.
formatLabel((label: Date) => string)"Mar 3" in localeFormats Date / number labels.
captionstringNoneHidden caption that names the table for screen readers.
order"newest" | "oldest""newest"Sets the sort order: newest first (default), or oldest first.
limitnumber30Rows shown before "Show all" (opening the table stays instant on long strips).

Keyboard

KeysAction
TabFocus the strip (one tab stop).
→/↓Next block (← in right-to-left layouts); a scrolling strip follows it.
←/↑Previous block.
Home/EndOldest / newest block.
EscapeStop reading.

Accessibility

  • The strip is one focusable figure; its description counts each status (“Operational: 82, Degraded: 4…”), so the summary needs no hovering.
  • Each block read by keyboard is announced once: period, status and detail.
  • Color is never the only cue: every status has an icon and a name, degraded blocks are striped and outages carry a caret.
  • Strips too long for the width scroll inside their own container, opened at the latest end, instead of squeezing blocks below 3px.
  • Forced colors give every block a CanvasText border; reduced motion draws the strip in place.

All exports on this page

  • TrackerChart — A strip of status blocks, one per period (Tremor's Tracker): uptime, build health, SLA days.
  • TrackerTable — Every block: its period, status (icon + label) and detail.
  • defaultTrackerChartLabels — The built-in English strings of TrackerChart; spread it into your own labels and change what you need.
  • defaultTrackerStatuses — The default statuses: "ok", "degraded", "down" and "none" (no data).
  • trackerToneColor — CSS colour of a status tone.

When to use the uptime tracker

  • Use it as a status page uptime bar for the last 90 days, where each block is a day with its own tooltip and the legend counts each status.
  • It fits a compact status page with one strip per service in a single glass card, without legends, so a dozen services fit in one view.
  • It works for CI history, such as the last 48 builds on main, using custom statuses with their own palette slot or tone, an icon and optional stripes or a caret.
  • Skip it when you need the magnitude of a value over time; use LineChart or Sparkbar, and use CalendarHeatmap for a year of daily intensity in a week by weekday grid.
  • Pair it with ChartCard for the title and legend, Badge to show the current status, and TrackerTable to give screen reader users every period as a table row.

Frequently asked questions

48 charts pages in all: browse them on Charts.

By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .