Calm motion: animations on this site only fade, with no movement
UptimeBar
Status history, one segment per period
A row of segments that shows the status of a service over time, as on a status page. Each segment is one period, for example one day. The oldest period is first.
Basic
60 days agoToday
vue
<template>
<div style="width: 100%">
<BlessUptimeBar :items="items" />
<div class="row" style="justify-content: space-between; margin-top: 8px; font-size: 0.85em">
<span>60 days ago</span><span>Today</span>
</div>
</div>
</template>
<script setup lang="ts">
import { BlessUptimeBar, type BlessUptimeItem } from "blessing-ui";
const fmt = new Intl.DateTimeFormat("en", { month: "short", day: "numeric" });
const end = Date.UTC(2026, 9, 12);
// 60 days: mostly up, a few bad days, no data before monitoring started
const items: BlessUptimeItem[] = Array.from({ length: 60 }, (_, i) => ({
label: fmt.format(end - (59 - i) * 86_400_000),
status: i < 4 ? "none" : i === 23 ? "down" : i === 24 || i === 47 ? "degraded" : "up",
}));
</script>itemsis a list of{ status, label }.statusisup,degraded,down, ornone(no data). The tooltip of a segment shows itslabeland its status.- A degraded segment has stripes. The colors of up and degraded are close for some color-blind readers, so the stripes tell them apart.
- The bar is a group, and its name is a summary, such as "98.21% uptime over 60 periods". Degraded periods count as up. Periods without data do not count.
- The bar is one tab stop, on the newest period. Use ← and → to move to the next period, and Home and End to go to the first or last period. The focused segment shows its tooltip text under the bar, and a screen reader reads the same text.
localeformats the percent. Change the words withlabelsor a label pack.labels.summarygets the formatted percent and the number of periods, so you can write "days" in place of "periods".- The bar fills the width of its container. Set
--bless-uptime-heightto change its height (default 32px). Put the start and end dates under the bar yourself, as the demo does.
Usage
ts
import { BlessUptimeBar } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
items* | BlessUptimeItem[] | — | one segment per period, oldest first |
locale | string | — | formats the percent; defaults to the language of the browser |
labels | Partial<{ summary: (percent: string, periods: number) => string; up: string; degraded: string; down: string; none: string; }> | — |