Per-period status bars for one service — the uptime row of a status page or a health panel. Hover or focus a bar for its date, state and uptime; the row is one tab stop with arrow-key movement, and a summary line shows the uptime over the range. Bad days also dip in height, so state never rests on colour alone.
Last 60 days
- Operational
- Degraded performance
- Partial outage
- Major outage
- Maintenance
- No data
- Public API60 days ago99.97% uptimeToday
- Webhooks60 days ago99.99% uptimeToday
- Dashboard60 days ago99.98% uptimeToday
Installation
The whole kit as one package — get updates by bumping the version. Add the styles to globals.css: @import "@vamos-ui/react/styles.css";
Usage
import { UptimeBars, UptimeLegend } from "@vamos-ui/react";
<UptimeLegend />
<UptimeBars name="Public API" bars={days} onBarSelect={(day) => openIncident(day.date)} />Tooltips never show on touch: every fact in a tooltip is also in the bar's accessible name, so put what matters in note, not only details.
Colours come from the status tokens (success, warning, danger, info, track); percentages from the locale formatter ("99.95%" / "%99,95").
Examples
Open an incident from a bar
onBarSelect runs on click and Enter; selectable: false makes quiet days inert (aria-disabled). details adds rich tooltip content.
Days with an incident open it — try the red bar.
Weekly periods
label replaces the formatted date; startLabel / endLabel rename the summary ends; precision sets the decimals.
API
UptimeBars
| Prop | Type | Default |
|---|---|---|
barsPeriods, oldest first. | UptimeBar[] | — |
nameService name — names the row for screen readers ("Public API, uptime history"). | string | — |
uptimeSummary figure 0–100. Default: uptimePercent(bars). | number | — |
precisionFraction digits of uptime figures. | number | 2 |
dateFormatDate in the tooltip and accessible names. | DatePreset | Intl.DateTimeFormatOptions | "medium" |
onBarSelectClick / Enter on a selectable bar. | (bar, index) => void | — |
severityBars dip by severity (degraded → partial → major); maintenance is hatched, no data is dashed. | boolean | true |
summaryStart · uptime · end line under the bars. | boolean | true |
startLabel / endLabelEnds of the summary line. | ReactNode | "{n} days ago" / "Today" |
legendLegend under this row (use UptimeLegend once for a list). | boolean | false |
labelsDictionary namespace "uptimeBars": state names, uptime, rowLabel, start, end, legend, selectHint. | Partial<UptimeBarsLabels> | — |
UptimeBar
| Prop | Type | Default |
|---|---|---|
date"YYYY-MM-DD" or ISO instant. | string | — |
statusState of the period. | "operational" | "degraded" | "partial" | "major" | "maintenance" | "none" | — |
uptime0–100. Missing counts as 100 in the summary. | number | — |
labelPeriod name instead of the date ("Week 42"). | string | — |
notePlain text in the tooltip and the accessible name. | string | — |
detailsExtra tooltip content (not read as the name). | ReactNode | — |
selectableWith onBarSelect: false makes the bar inert. | boolean | true |
UptimeLegend
| Prop | Type | Default |
|---|---|---|
statusesStates to list. Default: all six. | UptimeStatus[] | — |
severitySwatches match the bar heights. | boolean | true |
uptimePercent(bars)
| Prop | Type | Default |
|---|---|---|
returnsMean uptime of the bars with data. | number | null | — |