shadcn.io is an independent project built on shadcn/ui
The badge shows the word Badge on a muted fill. It is the secondary variant, and there is no icon.
Use it for Draft, Pending, or a type that should not shout. If the message is a sentence, use an Alert. In React, Ark UI reads the word with the text around it.
Installation
Anatomy

Usage
<Badge variant="secondary">Badge</Badge>FAQ
What does variant secondary change?
This badge sets variant="secondary", so it uses the secondary background and secondary-foreground text. That is the muted label.
What are the other badge variants?
default, outline, ghost, link, destructive, info, success and warning. default is the primary fill. destructive, info, success and warning carry those meanings.
How do I change the size or round it fully?
size takes sm, md or lg. pill rounds the badge fully. This demo sets neither, so you get the normal label.
Why doesn't the label wrap?
The badge is whitespace-nowrap, so the label stays one line. Shorten the text. A sentence belongs in an Alert.
API Reference
Badge
Sets variant="secondary". The rest is on the Badge page.



