Badge
The Badge component displays compact elements that represent an input, attribute, or action. Supports different colors, sizes, and interactive features like removal. Inner label accepts the full Text-prop API via
labelProps.Examples
(6)Properties
(31)Playground
Basics
Wrap any label in a Badge to render a compact tag — the default
filled variant and primary color apply automatically.Semantic colors
Set the
color prop to tokens such as primary, success, warning, error, or gray to align Badges with semantic meaning instead of hard-coded hex values.Size scale
Adjust the
size prop (xs through 3xl, or a number) to match the density of the surrounding UI.Variant styles
Pick a
variant like filled, outline, light, subtle, or gradient when you need to shift emphasis without changing the Badge content.Shadow depth
Use the
shadow prop (none through xl) to raise a Badge when it needs extra emphasis over surrounding UI.Prop aliases
Shorthand props
v and c mirror variant and color, so you can write more compact JSX without losing any functionality.Scan to open this page on your phonereact-ui-library.com/components/Badge
</>
react-ui-library
100+ accessible, themeable components that work seamlessly across iOS, Android, and Web.
A Platform Blocks product.
Quick Links
Resources