Skip to Content
ComponentsBadge

Badge

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

Badge
import { Badge } from "@/components/ui/badge"
<Badge>Badge</Badge>

Examples

Variants

DefaultPrimarySecondaryDestructiveOutlineGhost
<Badge>Default</Badge> <Badge variant="primary">Primary</Badge> <Badge variant="secondary">Secondary</Badge> <Badge variant="destructive">Destructive</Badge> <Badge variant="outline">Outline</Badge> <Badge variant="ghost">Ghost</Badge>

With icon

Hot 12 notificationsNew
import { Flame, Bell } from "lucide-react" <Badge> <Flame data-icon="inline-start" /> Hot </Badge> <Badge variant="secondary"> <Bell data-icon="inline-start" /> 12 notifications </Badge>
<Badge asChild variant="outline"> <a href="#">View changelog</a> </Badge>
Last updated on