Overview
Badge displays compact inline information, including short labels and counts. Use Tag for categories, Chip for compact controls, or Status for a named state with an indicator.
Usage
span.
With an icon
aria-hidden and keep a visible label to explain the content.
Appearance
size accepts xs, sm, or md. color accepts tertiary, inherit, primary, red, secondary, or accent. The accent treatment pairs an accent-tertiary fill with accent11 text in both themes. The solid primary and red treatments use blue and red fills with on-accent text. shape accepts pill or circle. The defaults are sm, tertiary, and pill. The circular treatment has a fixed width equal to its height. Use pill for longer content, including abbreviated counts.
Counts and visibility
aria-label or aria-labelledby.
Native composition
className, style, and ref target the actual root element. render accepts an element or callback through Base UI composition. Choose an appropriate native owner for interactive content:
Props
Types and defaults are generated from the publicBadgeProps type. Native attributes and event handlers are also accepted.
ReactNode
Caller-provided text, numbers, icons, or other inline content.
"accent" | "inherit" | "primary" | "red" | "secondary" | "tertiary"
default:"tertiary"
Neutral tertiary, inherited text, solid primary accent, solid red, soft accent tint, or secondary treatment.
ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, {}>
Replaces the default span. Native props, handlers, and the ref target the rendered element.
"circle" | "pill"
default:"pill"
Rounded pill label or fixed circle with width equal to its height. Use pill for longer content.
"md" | "sm" | "xs"
default:"sm"
Compact height, font size, and spacing: xs, sm, or md.