Status Dot
Colored status indicator with optional label and pulse state.
pnpm dlx @glinui/cli@latest add status-dotSystem status
Updated 2 minutes ago
Installation
pnpm dlx @glinui/cli@latest add status-dotPrefer the package?
Usage
Sizes and states
Three sizes and every status.
import { StatusDot } from "@glinui/ui"
export function Demo() { return ( <div className="flex flex-wrap items-center gap-x-8 gap-y-4"> {(["sm", "md", "lg"] as const).map((size) => ( <StatusDot key={size} size={size} status="success" label={`Size ${size}`} /> ))} {(["neutral", "info", "success", "warning", "danger"] as const).map((status) => ( <StatusDot key={status} status={status} pulse={status === "danger"} label={status} /> ))} </div> )}Pulse
Enable `pulse` to add a `motion-safe:animate-pulse` animation to the dot. Useful for active or live states.
import { StatusDot } from "@glinui/ui"
export function StatusDotPulseDemo() {
return (
<div className="flex flex-col gap-2">
<StatusDot status="success" label="Live" pulse />
<StatusDot status="danger" label="Critical" pulse />
</div>
)
}Sizes
import { StatusDot } from "@glinui/ui"
export function StatusDotSizeDemo() {
return (
<div className="flex flex-col gap-2">
<StatusDot status="success" size="sm" label="Small" />
<StatusDot status="success" size="md" label="Medium" />
<StatusDot status="success" size="lg" label="Large" />
</div>
)
}Dot Only
Omit the `label` prop to render a standalone colored dot, useful in compact table cells or avatar badges.
import { StatusDot } from "@glinui/ui"
export function StatusDotOnlyDemo() {
return (
<div className="flex items-center gap-3">
<StatusDot status="neutral" />
<StatusDot status="info" />
<StatusDot status="success" />
<StatusDot status="warning" />
<StatusDot status="danger" />
</div>
)
}With Children
Pass children instead of the `label` prop when you need richer label content. The `label` prop takes priority if both are provided.
import { StatusDot } from "@glinui/ui"
export function StatusDotChildrenDemo() {
return (
<StatusDot status="info">
<span className="font-medium">Syncing</span>{" "}
<span className="text-neutral-400">, 3 items remaining</span>
</StatusDot>
)
}Accessibility
- Pair status color with text for non-color-only communication.
- Optional pulse animation is reduced-motion safe.
- The dot `<span>` is `aria-hidden="true"`, color alone does not convey meaning to assistive technologies.
- Always supply a `label` or `children` describing the status in plain text.
- When using `StatusDot` inside a live region (e.g. a dashboard that polls for updates), wrap it in `role="status"` with `aria-live="polite"`.
ARIA Attributes
- `aria-live="polite"` when representing dynamic system state
Reduced Motion
Pulse animation uses `motion-safe` and disables with reduced-motion preferences.
The `pulse` animation uses `motion-safe:animate-pulse`. Under `prefers-reduced-motion: reduce`, the dot renders as a static colored circle with no animation.
Affected properties
opacityAPI Reference
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
status | "neutral" | "info" | "success" | "warning" | "danger" | No | neutral | Dot color semantic. |
size | "sm" | "md" | "lg" | No | md | Dot and label size scale. |
pulse | "true" | "false" | No | false | Enable subtle pulse animation on the indicator. |
label | string | No | - | Optional status label text. |
Source
Import directly from the package or browse the source on GitHub. Click any file to view it.
Generated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/status-dot.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata
Primary Props Type
StatusDotProps
StatusDotProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
label | string | No | - | - |
pulse | "true" | "false" | No | false | Variant option from dotVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from statusDotVariants. |
status | "neutral" | "info" | "success" | "warning" | "danger" | No | "neutral" | Variant option from dotVariants. |