Skip to main content

Status tracker Pro

A row of bars, one per period, coloured by status: a service's uptime or a habit's streak at a glance, as status pages draw it. Press, hover or arrow through it for each period's details. Screen readers hear how many periods had each status.

import { StatusTracker } from '@patine-ui/pro';
Loading…
<StatusTracker data={days} accessibilityLabel="API uptime, last 45 days" style={{ width: 360 }} />

Try the props​

Props
height
design
<StatusTracker data={uptime} />

Example: a status page​

A service's public status page: one row per component over the last 60 days, its uptime beside the name, and each bar's tooltip says what happened that day.

Loading…
<VStack gap="lg" style={{ width: '100%' }}>
  {SERVICES.map((s) => (
    <VStack key={s.name} gap="xs">
      <HStack justify="space-between">
        <Text weight="medium">{s.name}</Text>
        <Text size="sm" color="textSecondary">{s.uptime} uptime</Text>
      </HStack>
      <StatusTracker data={s.data} height={28} showLegend={false} accessibilityLabel={`${s.name}, last 60 days`} />
    </VStack>
  ))}
</VStack>

Statuses​

The defaults are an uptime page's: ok (Operational, the theme's success colour), warning (Degraded), error (Down, danger) and none (No data). Pass statuses to name and colour your own; a colour is a theme colour name or any CSS colour.

<StatusTracker
data={habit}
statuses={{ done: { label: 'Done', color: 'primary' }, missed: { label: 'Missed', color: 'border' } }}
/>

Props​

PropTypeDefaultDescription
data{ status, tooltip? }[]—One bar per period, oldest first.
statusesRecord<string, { label, color }>uptime statuses
heightnumber32
widthnumberfills the container
showLegendbooleantrueEach status with its count.
showTooltipbooleantrue
accessibilityLabelstring—
animatebooleantrue
loadingbooleanfalseA pulsing placeholder in place of the bars.
theme / designprovider'sBar gaps and corners follow the design.