Badge

Compact status pill with variants, icons and a live dot. Changing status crossfades the colour instead of snapping, success shows a check, and loading shows three pulsing dots.

Preview

Props Changes apply to the live preview above.

Installation

npx @lumioui/cli add badge

Usage

import { Badge } from "@/components/ui/badge/badge";
<Badge />

Examples

Glass

Glass status pills over a sneaker product shot, the one place glass belongs: chrome floating on a photo.

Loading

Calendar accounts in a scheduling app.

Status

A scores list where every badge is the match state: the live one blinks and its minute ticks forward, finished and postponed games sit still.

Variants

A job-search tracker where every colourway is the stage it means.

API reference

Prop Type Default
variant
"default" | "secondary" +7 "default" | "secondary" | "destructive" | "outline" | "success" | "warning" | "info" | "neutral" | "glass"
"default"
size "sm" | "md" | "lg" "md"
className string —
textClassName string —
icon IconName | null

Leading icon name. Ignored when loading is true. / / Leading glyph — pass null to suppress the variant's auto status icon.

—
loading boolean

Busy: the status glyph swaps in place for three dots that brighten in turn. Default false.

false
pulse boolean

Live state — a small dot inside the pill that blinks while live (on-air, recording, in progress). Only pass it while the state is genuinely live.

—
popIn boolean

Ignite with a spark on mount — for a count that just arrived. Default false.

false
contentKey string | number

When this key changes, the content swaps in place (numeric keys lift ≤6px in the direction of change).

—
accessibilityLabel string

Accessible label — announced instead of the visible text.

—
children React.ReactNode —