Xzero UI
Pro library

Provider statusPro

A status card for the AI providers your product depends on. Each row shows the provider's real mark, its health as an icon and label, p50 latency and a 30-day uptime bar with a tooltip for each day. An incident row expands into its timeline of updates, and the card checks again on a visible countdown.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui-pro/provider-status
Live · keyboard ready

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui-pro/provider-status

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { ProviderStatus } from "@/components/xzero/provider-status/provider-status";
import { AnthropicMark, OpenaiMark } from "@/components/xzero/provider-status/provider-status";

export function Health() {
  const [providers, setProviders] = useState<ProviderStatusItem[]>(initial);
  return (
    <ProviderStatus
      providers={providers}
      refreshInterval={60_000}
      onRefresh={async signal => {
        const res = await fetch("/api/provider-status", { signal });
        if (!res.ok) throw new Error("Couldn’t reach the status feeds. Showing the last results.");
        return (await res.json()) as ProviderStatusItem[];
      }}
      onOpenIncident={(provider, incident) => window.open(incident.url, "_blank")}
      footnote="Latency is the median over the last 5 minutes."
    />
  );
}

API reference

ProviderStatus

A status card for the AI providers a product depends on. Each row shows the provider's real mark, its health as an icon and label (Operational, Degraded, Outage), median latency in tabular numerals and a 30 day uptime bar of small ticks with a tooltip per day. A row with an incident expands into its updates (Investigating, Identified, Monitoring, Resolved), newest first, and new updates grow the panel smoothly. The header sums up health across providers and checks again on a visible countdown ring, with a refresh button, a Checking state and an error state that keeps the last results. Narrow cards switch to two lines per row. With no props it plays a sample story on simulated checks: an OpenAI outage and a Gemini slowdown resolve, Mistral has a short incident, and one check fails to show the error state.

PropTypeDefaultDescription
providersProviderStatusItem[]–The providers to show. Each has id, name, mark (a 16px ReactNode), detail (a short line such as the models you call), status ("operational" | "degraded" | "outage"), latencyMs, days and incident. Leave it out to play the built in sample.
providers[].daysProviderDay[]–Daily history, oldest first; the bar shows the last 30 and pads missing days as No data. Each day has date ("YYYY-MM-DD"), uptime (0 to 100, or null), an optional status (derived from uptime when left out: below 99.9 degraded, below 99 outage) and an optional note for the tooltip. The last day is labeled Today.
providers[].incident{ id: string; title: string; updates: IncidentUpdate[]; url?: string }–An open or just resolved incident. Its row becomes a button that expands the updates. Each update has stage ("investigating" | "identified" | "monitoring" | "resolved"), at (a Date, a timestamp shown as HH:MM UTC, or a preformatted string) and message.
onRefresh(signal: AbortSignal) => Promise<ProviderStatusItem[] | void>–Fetches fresh status on the countdown and on the refresh button. Return the new providers, or update the providers prop yourself and return nothing. Throw to show the error state; the last results stay on screen and the countdown turns into a retry. A newer check aborts the older one through the signal. Without it the refresh controls are hidden.
refreshIntervalnumber | null30000Milliseconds between automatic checks. The countdown pauses while the card is off screen or the tab is hidden. Retries after an error wait at most 10 seconds. Null turns auto refresh off and keeps the refresh button. The sample uses 8000.
loadingbooleanfalseShows skeleton rows with the same row height, for the first load.
errorstring | null–An error to show in the header, such as a failed first load. Errors thrown by onRefresh show on their own.
titlestring"AI providers"Card title.
expandedIdstring | null–Which provider's incident is open. Pair with onExpandedChange.
defaultExpandedIdstring | nullnullThe incident open on first render when uncontrolled.
onExpandedChange(id: string | null) => void–Called when an incident row is opened or closed.
onOpenIncident(provider: ProviderStatusItem, incident: ProviderIncident) => void–Called by the Status page link in an open incident. Without it, the link opens incident.url in a new tab; with neither, the link is hidden.
footnoteReactNode–A quiet line under the list, such as how latency and uptime are measured. The sample shows a sample data note.
noticestring–A one-off message for screen readers, such as the result of an action.
classNamestring–Class on the root element.

sampleProviders

The sample data behind the preview, exported for prototypes and tests: sampleProviders(check) returns six providers (Anthropic, OpenAI, Google Gemini, Mistral AI, xAI, Amazon Bedrock) after a number of simulated checks. Every number is a plausible sample, not a measurement.

PropTypeDefaultDescription
checknumber–How many simulated checks have run. The story loops every 11 checks.

AnthropicMark, OpenaiMark, GeminiColorMark, MistralColorMark, XaiMark, AwsMark

The provider marks used by the sample, from Simple Icons (CC0) and Lobe Icons (MIT). Mono marks draw with currentColor; Gemini and Mistral keep their brand fills.

PropTypeDefaultDescription
titlestring–Accessible name of the mark.

Keyboard interactions

KeysAction
TabMoves to the refresh button, each incident row and each uptime bar.
Enter / SpaceOn an incident row, opens or closes its updates.
Arrow Left / Arrow RightOn an uptime bar, moves the day tooltip one day back or forward.
Home / EndOn an uptime bar, jumps to the oldest day or today.
EscapeOn an uptime bar, hides the day tooltip.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Also in ai

Guidance for AI tools

Provider status: A status card for the AI providers your product depends on. Each row shows the provider's real mark, its health as an icon and label, p50 latency and a 30-day uptime bar with a tooltip for each day. An incident row expands into its timeline of updates, and the card checks again on a visible countdown. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components