Status Dot
Server ComponentPresence dot with pulse, optional label, and avatar-overlay anchoring.
Import
import { StatusDot } from "@cronus-ui/ui";
npx cronus-ui add status-dot
Examples
.cronus
The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.
default.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component StatusDotDefault layout:inline style:status-dot {
label "default"
}
page "/audit/status-dot/default" type:custom {
use StatusDotDefault
}
API Reference
Generated from the component's exported types.
StatusDotProps
Extends Omit<HTMLAttributes<HTMLSpanElement>, "children">, VariantProps<typeof statusDotVariants>
| Prop | Type | Default | Description |
|---|---|---|---|
status | StatusDotStatus | "online" | Presence / semantic state the dot communicates. Drives the fill color and the default accessible name. |
size | StatusDotSize | "md" | Dot size preset. |
ring | boolean | false | Draws a surface-colored ring around the dot so it cuts out cleanly when overlaid on an avatar or icon. |
label | string | The English name of `status` (e.g. `"Online"`). | Status text. Rendered next to the dot when `withLabel` is set; otherwise rendered as visually-hidden live-region content so screen readers announce both the initial status and later `status` changes. |
withLabel | boolean | false | Renders `label` visibly next to the dot (in `text-fg-secondary`) instead of exposing it only to assistive technology. |
pulse | boolean | false | Animates an expanding "ping" halo behind the dot to draw attention. The halo reuses the dot's fill; the hollow `offline` dot gets a matching outline halo instead (its fill is transparent). The animation only runs for users who have not requested reduced motion. |
position | StatusDotPosition | "none" | Absolute corner anchor for overlaying the dot on an avatar or icon — place the component inside a `relative` wrapper. The "right" corners map to the inline end, so they mirror under RTL. |
asChild | boolean | — | Render as the child element via Slot. |
className | string | — | Additional class names merged onto the root. |
id | string | — | DOM id of the root element. |