Status Dot
FreeNewA colored dot with its meaning in words, and an optional expanding ring for something happening now.
Installation
pnpm dlx shadcn@latest add @viewport/status-dot
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above.
import { StatusDot } from "@/components/viewport/status-dot";
const services = [
{ name: "API", tone: "success", label: "Operational", live: true },
{ name: "Dashboard", tone: "success", label: "Operational" },
{ name: "Webhooks", tone: "warning", label: "Delayed" },
{ name: "Email delivery", tone: "danger", label: "Outage" },
{ name: "Exports", tone: "neutral", label: "Paused" },
] as const;
export default function StatusDotDemo() {
return (
<ul className="w-full max-w-xs divide-y divide-border rounded-2xl border border-border bg-card">
{services.map((service) => (
<li key={service.name} className="flex items-center justify-between gap-4 px-4 py-3">
<span className="text-sm font-medium">{service.name}</span>
<StatusDot tone={service.tone} label={service.label} live={"live" in service} className="text-muted-foreground" />
</li>
))}
</ul>
);
}Props
| Prop | Type | Default |
|---|---|---|
| tone | keyof typeof tones | "neutral" |
| label* | stringThe status in words. It is always rendered, so the color is never the only signal. | — |
| hideLabel | booleanHide the label visually and keep it for screen readers, e.g. in a dense table column. | false |
| live | booleanAdd a slow ring that expands from the dot, for something happening right now. | false |
Accessibility
- The label is always present and can be visually hidden in dense tables.
- The ring is decorative and still under reduced motion.
- Server component with no client JavaScript.