Search documentation

Find a component or a docs page

Badge

Displays a badge or a component that looks like a badge.

Usage

Default

Secondary

Destructive

Outline

Ghost

With icon

Mark the icon with data-icon="inline-start" or "inline-end" so the badge tightens the padding on that side. Icons are sized to 12px.

Custom colors

Badge ships the shadcn variants. For any other color, pass class: with a light and a dark shade of the same scale, so the text stays readable in both themes.

Sizes

Installation

Components

ComponentBuilt usingSource
BadgePhlex
BadgeDocsPhlex