Back to Components
Feedback
Badge
Small badge component with multiple style variants for labels or tags.
PropsUsage ExampleVariations
NewBetaOutlineMutedGhost
Dependencies
- class-variance-authority
- clsx
- tailwind-merge
Files
- components/ui/badge.tsx
Installation
Using shadcn CLI
npx shadcn add badge --url https://ui.hampton.ioManual installation
Copy the component file to your project and install dependencies:
npm install class-variance-authority clsx tailwind-mergeRelated Feedback Components
Alert Banner
Full-width dismissible banner for announcements with icon and close button.
Announcement Banner
Dismissible banner with icon, message, and optional action button.
Badge Group
Grouped badges for displaying multiple status labels or tags.
Callout
Information callout box with tip, info, warning, and danger variants. Supports collapsible content.
Empty State
Centered empty state placeholder with icon, text, and optional action.
Inline Alert
Contextual alert component for inline feedback with icon, title, and action support.