Back to Components
Feedback

Badge

Small badge component with multiple style variants for labels or tags.

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.io

Manual installation

Copy the component file to your project and install dependencies:

npm install class-variance-authority clsx tailwind-merge