Badge

Loading...

Installation

Add the component with the CLI.

npx shadcn@latest add @intentui/badge

Manual installation

Install the dependencies, then copy the component source into your project.

npm install tailwind-variants

Examples

Intent

Badges come in a variety of colors: primary, secondary, success, info, warning, danger, light, dark, and light/dark. You can even use custom colors if you want.

Loading...

Shape

By default, badges are square, but you can switch to a circular shape if desired.

Loading...

Component API

Badge extends the native <span> element.

classNamestring
intent"primary" | "secondary" | "success" | "info" | "warning" | "danger" | "outline"
isCircleboolean
Design