# Badge Component Documentation ## Overview The Badge component displays a badge or badge-like visual element. It extends standard span functionality with customizable variants and shapes. ## Type Definition ```typescript interface BadgeProps extends ComponentProps<"span">, VariantProps { asChild?: boolean; variant?: "default" | "secondary" | "destructive" | "success" | "warning" | "accent"; type?: "default" | "circle" | "dot"; } ``` ## Properties | Property | Type | Default | Purpose | |----------|------|---------|---------| | `variant` | `'default' \| 'secondary' \| 'destructive' \| 'success' \| 'warning' \| 'accent'` | `'default'` | Determines the visual styling | | `type` | `'default' \| 'circle' \| 'dot'` | `'default'` | Controls shape and layout presentation | | `asChild` | `boolean` | `false` | Enables `Slot` rendering for child element styling | | span props | `ComponentProps<'span'>` | — | All native HTML span attributes supported | ## Basic Examples Simple badge variants: ```jsx Default Deployed 3 ``` ## Usage Patterns **Variant showcase:** ```jsx Badge Secondary Destructive Success warning ``` **Circular badge indicators:** ```jsx 3 3 3 3 3 ``` **Dot indicators:** ```jsx ``` ## References - [Radix UI Badge Documentation](https://www.radix-ui.com/primitives/docs/components/badge) - [API Reference](https://www.radix-ui.com/primitives/docs/components/badge#api-reference)