Skip to content
Playground

Status Pill

A compact pill for status and category labels.

A compact, rounded label for status and categories. Choose a semantic intent or named palette with the color prop.

ActivePendingBlocked
TSX
import { StatusPill, type StatusPillColor } from "@zentara-co/zenos-ui";

StatusPill uses a consistent rounded shape, tinted fill, and bold uppercase presentation. Choose the palette with color; its default is neutral. It does not have Badge’s appearance variant prop.

The supported colors match Badge: neutral, brand, danger, warning, information, success, gray, red, orange, yellow, lime, green, teal, cyan, sky, blue, indigo, purple, and pink.

StatusPill defaults to fully rounded corners (rounded={true}). Set rounded={false} for regular corners without changing the color or uppercase treatment. Custom classes can still override the corner radius.

Regular cornersFully rounded

Use StatusPill.Icon for a decorative icon, and keep the status meaning in the text. StatusPill.Root is an alias for StatusPill.

Verified

Use render={<a href="…" />} for a status or category label that navigates to related content. StatusPill renders that anchor instead of a wrapping span, keeping its color, rounded, custom styling, hover feedback, and visible keyboard focus ring. Without render, StatusPill and StatusPill.Root remain noninteractive spans.

Put native anchor props such as href, target, rel, download, and aria-current on the element passed to render. Base UI merges its classes, styles, event handlers, and ref with StatusPill’s props. StatusPill.Icon also works inside links. For a new tab, pair target="_blank" with rel="noopener noreferrer" and make that behavior clear in the link text.

Your router’s link component can also be passed through render if it forwards props and its ref to an anchor. For a render callback, spread the supplied props onto the element you return so styling, accessibility attributes, and refs are preserved.

Use the usual className prop for your own appearance without supplying color or rounded. Your classes apply after the built-in styling and override conflicting background, border, foreground, shape, spacing, and typography. Native style props are also forwarded. Prefer semantic tokens for theme-aware colors.

In review

Share a class string or an application CSS class to reuse an appearance. The same approach works with render links. Layout-only classes keep the default appearance, and color remains an optional convenience for built-in palettes.

StatusPill
StatusPill.Root
StatusPill.Link
StatusPill.Icon

API

PropTypeDefaultDescription
className string — Custom styling and instance overrides. No color or rounded prop is required.
render ReactElement | ((props, state) => ReactElement) — Replace the default span with an anchor or router link. Base UI merges props, handlers, and refs.
rounded boolean true Fully rounded corners when true; regular corners when false.
color StatusPillColor neutral Semantic intent or named color palette, independent of appearance.
native props React.HTMLAttributes<HTMLSpanElement> — Forwards native attributes, events, aria-*, data-*, className, style, and ref.
href string — Navigation destination on the anchor passed to render. Also supported by StatusPill.Link.
anchor props AnchorHTMLAttributes<HTMLAnchorElement> — StatusPill.Link forwards native anchor attributes and an HTMLAnchorElement ref.

Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props, including className, style, aria-*, and data-*.

StatusPill is a native span by default and does not add interaction or automatic live announcements. Use render with an anchor and an href for navigation, keeping its keyboard focus indicator visible and its link text descriptive. Do not nest interactive elements inside a link or use either form as a substitute for a button, filter, or selectable control. Explain status through text rather than color alone; opt into role="status" on a noninteractive label only for updates that need a polite live announcement.