Badge

Small status labels for counts, categories, and inline metadata — with variants, icons, and link composition.

Default

A simple status label.

Installation

CLI
npx @sonojs/ui@latest add badge

Usage

badge.tsx
import { Badge } from "@/components/ui/badge"

export function Example() {
  return <Badge>Badge</Badge>
}

Props

PropTypeDefaultDescription
variant"default" · "secondary" · "destructive" · "outline" · "ghost" · "link""default"Visual style of the badge.
asChildbooleanfalseRender as the child element (e.g. an anchor) instead of a span.