Skip to main content
HahlexMillarv0.1.0 Draft
ComponentsDraftWCAG 2.1/2.2 AAZero Gradients@hahlex/millar-ui

Badge

Pill-shaped status and governance tag combining border, soft wash, and leading indicator dot/icon so color is never the sole signal.

Interactive Playground

Live component specimen driven directly by Millar tokens in Light and Dark mode.

Show status dot
Draft Governance<Badge tone="brand" dot={true}>Draft Governance</Badge>
@hahlex/millar-ui
import { Badge } from "@hahlex/millar-ui";

<Badge tone="success">Approved</Badge>
<Badge tone="brand">Draft</Badge>

Props API

Badge component props
PropTypeDefaultDescription
tone"neutral" | "brand" | "sand" | "sage" | "success" | "warning" | "error""neutral"Semantic status or category tone.
dotbooleantrueRenders a 6px status indicator dot alongside the text label.

Usage Guidelines & Agent Guardrails

When to use
  • Lifecycle labels (Draft, Approved, Deprecated), operational statuses, and compact counts.
Responsive behavior

Inline-flex with nowrap text; wraps cleanly inside flex badge rows.

Anti-Hallucination Guardrails (AI & Human)
  • Never render bare unstyled colored text for statuses; always wrap in Badge.

Accessibility & Keyboard Contract

Pairs text + dot/icon so color-blind users never rely on hue alone.

Non-interactive display element; semantic contrast and non-color status cues apply.