SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

StatusStrip

A row of per-period bars, such as 90 days of uptime.

90 days ago99.95% uptimeToday
View code
tsx
<StatusStrip
	label="api.acme.dev uptime, last 90 days"
	summary="99.95% uptime"
	start="90 days ago"
	end="Today"
	periods={days.map((day) => ({ status: day.status, label: formatDay(day.date), value: day.uptime }))}
/>

Demo apps

Whole pages built only from @sdxc/ui, each for an invented product with its own palette and type. They open in a new tab.

Every demo, landings and docs sites alike, is listed in the demo gallery.

Installation

An ordinary dependency: install it, import the theme once, and import the component where it is used.

Terminal
npm add @sdxc/ui remix
typescript
import "@sdxc/ui/theme.css";

Usage

typescript
import { StatusStrip } from "@sdxc/ui/app";

Renders one bar per period as a button named by its label and value, inside a toolbar named by label, then the caption. The newest bar is the strip's one Tab stop, and StatusStripKeys moves it with the arrows; a bar's tooltip shows on hover and keyboard focus with no script.

Props

Read from the component's own types, so every prop, every default and every allowed value is listed.

PropTypeRequiredDescription
periodsreadonly Period[]Yes
labelstringYesAccessible name of the bars' toolbar ("Uptime, last 90 days").
summaryRemixNodeNoThe summary figure set in the middle of the caption ("99.95% uptime").
startRemixNodeNoCaption under the oldest end ("90 days ago").
endRemixNodeNoCaption under the newest end ("Today").
partsPartsPropsNo

Also accepts everything in Omit<TagProps<"div">, "children">.

Types

NameValuesWhat it decides
Status"up" | "degraded" | "down" | "paused" | "no-data"What one period recorded: up is success, degraded warning, down danger, paused neutral, and no-data a hatched bar that reads as unknown rather than as zero.
@sdxc/ui

Can’t find it? Contact us