GitHubGitHub
← All widgets
Data display / widget

Status widget

A high-visibility current state for services, jobs, and environments.

NormalWarningCriticalOfflineStale

checkout-service

Healthy normal
Status: normal

worker-07

Attention warning
Status: warning

db-primary

Offline offline
Status: offline
<StatusWidget label="checkout-service" value="Healthy" status="normal" />

Installation

pnpm add @chanrg/4ui

Import the stylesheet once, at the root of your app:

import '@chanrg/4ui/styles.css';

Usage

import { StatusWidget } from '@chanrg/4ui';<StatusWidget label="checkout-service" value="Healthy" status="normal" />

API reference

Props

PropTypeDefaultDescription
valuestringrequiredHuman-readable state.
statusHealthStatusnormalSemantic state.

CSS variables

VariableDescription
--4ui-surfacePrimary component surface.
--4ui-textPrimary foreground color.
--4ui-borderDefault control and panel border.

Accessibility

  • A visually hidden status phrase supplements the status color.

Dependencies

No runtime component dependencies.