Display · Badgestable
Badge
A short, non-interactive label for the status of an item or a small piece of metadata. Six intents, subtle or intense emphasis, three sizes.
Preview
#previewChange the options and the code follows. Show code opens the React snippet.
Completed
badge-example.tsx
import { Badge } from "@blade-ai/weft/components/badge";
<Badge>Completed</Badge>All states
#all-statesSubtle and intense emphasis in every intent, from the Badge artboard.
Props
#propsRead from the component source. Booleans are is-prefixed. A star marks a required prop.
Prop
Type
Default
Description
children *
ReactNode
—
Short status text.
size
"sm" | "md" | "lg"
"md"
Height 18 / 20 / 24px.
intent
"neutral" | "positive" | "negative" | "notice" | "information" | "primary"
"neutral"
Meaning of the badge; sets colour.
emphasis
"subtle" | "intense"
"subtle"
"subtle" is a tinted surface; "intense" is a solid fill.
Usage
#usageShort rules for choosing and writing badge.
Do
Map each status to one colour across the product: Completed is positive, Pending is notice, Failed is negative.
Keep labels to one or two words.
Use subtle emphasis by default and keep intense for the one status that must stand out.
Don't
Pick colours for decoration or variety.
Rely on colour alone; the text must carry the meaning.
Make a badge clickable; use a Tag or Button instead.
Accessibility
#accessibilityA badge is a span read in reading order, placed right after what it describes.
ARIA
Element
Role / attribute
When
Badge
span, no role
Not focusable. In a table, the column header gives the context.
Live updates
aria-live="polite" on a parent
Announce changes such as Pending to Completed yourself; the badge does not.
Colour
text label
All colour pairs meet 4.5:1 in light and dark.