Pho Design System

Badge

A small, non-interactive status label — a plan tier (Pro), a state (Live, Failed), a count. Badge is a plain <span>, so it never takes focus or handles clicks. For a dismissible or selectable chip, that’s a Tag; for a standalone action, use a Button.

Import

import { Badge } from "@photon-ai/pho-ui/components/badge";

Colors

color is a tight, semantic set: gray (the default), muted, brand, success, warning, and error. By default each fills the pill with its state ink (or a soft surface for muted) so the badge reads at a glance.

NeutralFreeProLiveDegradedFailed
<Badge color="gray">Neutral</Badge>
<Badge color="muted">Free</Badge>
<Badge color="brand">Pro</Badge>
<Badge color="success">Live</Badge>
<Badge color="warning">Degraded</Badge>
<Badge color="error">Failed</Badge>

Contrast

Two contrasts — high (default) and low. High is the solid state fill. Low is the quiet material for dense chrome: text takes the state color, and the soft fill plus hairline ring derive from it at low opacity.

NeutralFreeProLiveDegradedFailed
<Badge color="success" contrast="low">
  Live
</Badge>

Sizes

Three sizes — xs, sm, and md (default). A badge is intentionally small; there is no lg. Use xs for chips inline with 14px labels (plan tiers).

ProProPro
<Badge color="brand" size="xs">Pro</Badge>
<Badge color="brand" size="sm">Pro</Badge>
<Badge color="brand" size="md">Pro</Badge>

Props

Badge renders a plain <span> and forwards every native span attribute.

The badgeVariants({ color, contrast, size, className }) helper is also exported, for composing the badge’s look onto another element.

Accessibility

Best practices