Skip to content
Look

Shared with the landing page. Theme is the select beside this menu.

StatusPill

Open .md
Live preview

Loading example…

Pill showing a status LED and its label; collapseLabel hides the label when the surrounding container is narrow.

import { StatusPill } from "@jcsoftdev/ui/atoms";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/atoms/status-pill.

<StatusPill status="success" label="Caja abierta" />
Prop Type Default Description
status * "success" | "warning" | "danger" | "idle"
label * string
icon ReactNode Decorative leading icon, hidden from screen readers; the label still names the status.
dot boolean Shows the status dot. Defaults to true without an icon and false with one, where the icon carries the look; the label still names the status either way.
collapseLabel boolean false Hides the visible label when the surrounding container is narrower than 700 px (the status stays announced). Defaults to false: the label is always visible.
onSelect (() => void) Makes the pill a button. Without it, and without onClick, the pill is a plain span.
interactive boolean Forces the element: true renders a button even without a handler, false a span even with one. Omitted, the pill is a button only when onSelect or onClick is given.
classNames Partial<Record<StatusPillPart, string>> Per-part classes merged with cn; consumer classes win. className still targets the root and is merged last.

* marks a required prop.

It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).

packages/ui/src/atoms/status-pill/status-pill.tsx