# Badge URL: /docs/ui/badge A small label component for displaying status, categories, or metadata. import { PreviewCode } from "@/components/docs/preview-code.server"; import { BadgeSample, BadgeSizesSample, BadgeWithIconSample, BadgeAsLinkSample, BadgeAnimatedSample, } from "@/components/docs/samples/badge"; This is a **standalone component** that does not depend on the assistant-ui runtime. Use it anywhere in your application. Installation \[#installation] Usage \[#usage] ```tsx import { Badge } from "@/components/assistant-ui/badge"; export function Example() { return Label; } ``` Examples \[#examples] Variants \[#variants] Use the `variant` prop to change the visual style. ```tsx // Border (default) // Secondary background // Muted background // No background // Blue/info style // Amber/warning style // Green/success style // Red/error style ``` Sizes \[#sizes] Use the `size` prop to change the badge size. ```tsx // Small // Default // Large ``` With Icons \[#with-icons] Badges automatically style SVG icons. As Link \[#as-link] Use the `asChild` prop to render the badge as a different element, like a link. Animated \[#animated] Combine with CSS transitions for scroll and color animations. API Reference \[#api-reference] Badge \[#badge] Style Variants (CVA) \[#style-variants-cva] | Export | Description | | --------------- | ------------------------------- | | `badgeVariants` | Styles for the badge component. | ```tsx import { badgeVariants } from "@/components/assistant-ui/badge"; Custom Badge ```