Badge
Badge presents short status, label, or count information that helps people scan an interface.
Purpose
Badge presents short status, label, or count information that helps people scan an interface. It does not replace explanatory copy.
Status variants
Installation
With the Siteplane registry alias configured, add the component and import the installed source from your app.
CLI
pnpm dlx shadcn@4.16.1 add @siteplane/badgeImport
import { Badge } from "@/components/ui/badge";Need the machine-readable source metadata? View registry JSON.
Usage
Badge is for compact status and metadata. Keep the label short and pair color with text.
import { Badge } from "@/components/ui/badge";
export function Example() {
return <Badge variant="success">Active</Badge>;
}Examples
Variants, semantic status colors, sizes, icons and link rendering are props of the same primitive.
Variants
Semantic status
Sizes
With icon
As link
With render, the badge becomes a real link and keeps the badge hover and focus styles.
Count badge
Status dot
API Reference
The reference lists the source-owned exports and props that are easy to miss in visual examples. Inherited Base UI props remain available unless the wrapper narrows them.
variantaccepts"default","secondary","outline","destructive","error","info","success", or"warning".sizeaccepts"sm","default","lg", or"xl"; without a local value, Badge inherits the nearestSiteplaneUIProvider controlSize.- Use
renderto make a Badge a semantic link or button without nesting interactive elements.
Motion
Component motion uses the shared Siteplane motion contract. See the global motion guide for provider setup, tokens and reduced-motion behavior.
- A static Badge does not animate.
- Interactive badges inherit their link or Button states; do not add local motion values.
Accessibility
- Keep Badge text short and explicit.
- Do not communicate status through color or a status dot alone.
- Interactive badges need correct link or button semantics, visible focus, and an accessible name.
- Treat icons and dots as decorative when the text conveys the same meaning.
Implementation Guidance
- Use existing variants and sizes instead of inventing local badge colors.
- Do not use Badge for long explanatory text.
- Use
renderwhen the badge itself is interactive.