UIComponentsReact
A short label for a status, a count or a category.
Rendered by React 19.3.1
Installation
npx shadcn@4.23.0 add https://hamur.dev/r/react/badge.jsonIt also adds utils. The app needs its setup first: Installation.
Usage
Choose its look with variant. A badge is a span by default; render it as a link to make it one, as Button does.
import { Badge } from '@/components/ui/badge'Examples
Default
The default, secondary, outline and destructive looks.
API reference
Badge wraps no headless component of its own: its parts are elements with classes, and their props are the element's.