Skip to content
Drivn logoDrivn

Badge

Small status indicator with color variants.

Preview

DefaultSecondarySuccessOutlineDestructive

Installation

npx drivn add badge

Usage

1import { Badge } from "@/components/ui/badge"
2
3export default function Page() {
4 return (
5 <Badge variant="default">
6 New
7 </Badge>
8 )
9}

API Reference

PropTypeDefaultDescription
variant"default" | "secondary" | "success" | "outline" | "destructive""default"Visual style of the badge
classNamestringAdditional CSS classes to apply
childrenReactNodeContent displayed inside the badge