{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"badge","type":"registry:component","title":"Badge","description":"Small status pill in five colors, with a crossfade for when its variant changes.","author":"Ryan","dependencies":["clsx","tailwind-merge"],"registryDependencies":[],"files":[{"path":"components/motion/badge.tsx","type":"registry:component","target":"@components/motion/badge.tsx","content":"// easeui.dev/components/motion/badge\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport type BadgeVariant = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"destructive\";\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n  /** Color treatment. Default \"neutral\". */\n  variant?: BadgeVariant;\n}\n\nconst VARIANT_CLASS: Record<BadgeVariant, string> = {\n  neutral: \"bg-muted text-muted-foreground shadow-[0_0_0_1px_var(--border)]\",\n  accent: \"bg-accent/15 text-accent\",\n  success: \"bg-success/15 text-success\",\n  warning: \"bg-warning/15 text-warning\",\n  destructive: \"bg-destructive/15 text-destructive\",\n};\n\n/** A small status pill. Crossfades color when its variant changes, such as pending to success. */\nexport function Badge({ variant = \"neutral\", className, ...props }: BadgeProps) {\n  return (\n    <span\n      className={cn(\n        \"inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium transition-colors duration-150 ease-out\",\n        VARIANT_CLASS[variant],\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n"},{"path":"lib/utils.ts","type":"registry:lib","target":"@lib/utils.ts","content":"import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs))\n}\n"}]}