Dinachi

Badge

A small visual indicator for labeling, categorizing, or displaying status information.

View Source

#Installation

npx @dinachi/cli@latest add badge

#Usage

tsx
import { Badge } from '@/components/ui/badge'

#Examples

#API Reference

PropTypeDefaultDescription
variant'default' | 'secondary' | 'destructive' | 'outline' | 'success' | 'warning' | 'info''default'The visual style variant of the badge.
size'sm' | 'default' | 'lg''default'The size of the badge.
rounded'default' | 'sm' | 'md' | 'lg' | 'none''default'The border radius of the badge.
iconReactNodeIcon to display before the content.
dismissiblebooleanfalseWhether to show a close button.
onDismiss() => voidCallback when close button is clicked.