Badge
Shows a short label, status, or count.
Draft
badge-basic-demo.tsx
Installation
The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.
npm
yarn
pnpm
bun
Variants
DraftIn progressPublishedNeeds reviewSync failedInternal
badge-variants-demo.tsx
Dot
Screen readers skip the dot, so the label must name the status.
In progressPublishedNeeds reviewSync failed
badge-demo.tsx
API reference
- variant: "neutral" | "accent" | "success" | "warning" | "error" | "outline" = "neutral"
- Sets the colors.
- dot: boolean = false
- Shows a BadgeDot before the label.
- children: ReactNode
- The badge content. Text stays on one line and truncates if space is short.