# Uptime Bar

> A status-page uptime bar: one slim bar per day, coloured by how it went, with each day's uptime and incidents on hover.

Category: Charts · MotionKit Plus · Updated 2026-11-10 · Live demo: https://www.motionkitui.com/components/uptime-bar

## When to use it

Status pages, developer platform dashboards, API and infrastructure landing pages, and anywhere reliability is part of the pitch.

## How it works

Each day is a flex item in one row, so ninety bars share the width evenly at any size, and each is coloured by its status. As the row scrolls into view, every bar scales up from its base a few milliseconds after the one before. Hovering a bar, or moving through the days with the arrow keys, sets the active day: the others dim, and a tooltip springs along to sit above it, clamped so it never overhangs the ends. Overall uptime is the average of the days with data.

## Installation

Part of MotionKit Plus (https://www.motionkitui.com/pricing). Subscribers install it with `npx shadcn@latest add @motionkit/uptime-bar` after adding their registry token from https://www.motionkitui.com/account.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `days` | `UptimeDay[]` |  | One entry per day, oldest first: date, status (up, degraded, down or none), and optional uptime and note. |
| `label` | `string` | `"API"` | The service's name. |
| `colors` | `Partial<Record<UptimeStatus, string>>` |  | Colours for each status. |
| `locale` | `string` | `"en-GB"` | BCP 47 locale for the dates. |

## Accessibility

- **Keyboard: Pass.** Tab to the bar, then the arrow keys, Home and End step through the days, each showing its tooltip; Escape closes it.
- **Screen readers: Pass.** Labelled with the service and its overall uptime; the day you move to is announced with its date, status and note.
- **Reduced motion: Pass.** With reduced motion on, the bars appear at full height and the tooltip moves without sliding.
- **Colour contrast: Pass.** Status colours on the card's dark measure 6.8:1 or more, well above the 3:1 for graphics, and every day's status is also given in words.
