{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "badge",
  "type": "registry:ui",
  "title": "Badge",
  "description": "Small status indicator with variants for labels, tags, and status.",
  "dependencies": [
    "@radix-ui/react-slot"
  ],
  "devDependencies": [
    "class-variance-authority"
  ],
  "files": [
    {
      "path": "components/ui/badge.tsx",
      "content": "import { cva, type VariantProps } from \"class-variance-authority\"\nimport type * as React from \"react\"\nimport { Slot } from \"@/lib/slot\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst badgeVariants = cva(\n  \"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden\",\n  {\n    variants: {\n      variant: {\n        default:\n          \"border-transparent bg-primary text-white [a&]:hover:bg-primary/90\",\n        secondary:\n          \"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90\",\n        destructive:\n          \"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n        outline:\n          \"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n        warning:\n          \"border-amber-500 bg-transparent text-amber-500 dark:border-amber-400 dark:text-amber-400\",\n        beta: \"border-primary bg-primary/10 text-primary uppercase tracking-wider text-[10px] font-semibold\",\n        draft:\n          \"border-orange-500 bg-orange-500/10 text-orange-500 uppercase tracking-wider text-[10px] font-semibold\",\n        experimental:\n          \"border-red-500 bg-red-500/10 text-red-500 uppercase tracking-wider text-[10px] font-semibold\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n    },\n  },\n)\n\nfunction Badge({\n  className,\n  variant,\n  asChild = false,\n  ...props\n}: React.ComponentProps<\"span\"> &\n  VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n  const Comp = asChild ? Slot : \"span\"\n\n  return (\n    <Comp\n      data-slot=\"badge\"\n      className={cn(badgeVariants({ variant }), className)}\n      {...props}\n    />\n  )\n}\n\nexport { Badge, badgeVariants }\n",
      "type": "registry:ui"
    }
  ]
}