{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "badge",
  "title": "Badge",
  "description": "A ReUI-based Badge with semantic solid, light and outline variants, five sizes and Base UI render composition.",
  "dependencies": [
    "@base-ui/react@^1.8.0",
    "class-variance-authority@^0.7.1",
    "cn@^0.4.0"
  ],
  "files": [
    {
      "path": "registry/new-york/badge.tsx",
      "content": "\"use client\";\n\n/**\n * Adapted from ReUI Badge (https://github.com/keenthemes/reui).\n * MIT License\n * Copyright (c) 2025 Keenthemes Inc\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { cva } from \"class-variance-authority\";\nimport type { VariantProps } from \"class-variance-authority\";\nimport { cn } from \"cn\";\n\nconst badgeVariants = cva(\n  \"relative inline-flex w-fit shrink-0 items-center justify-center gap-1 border border-transparent font-medium whitespace-nowrap outline-none transition-[color,box-shadow] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-3\",\n  {\n    defaultVariants: { radius: \"default\", size: \"default\", variant: \"default\" },\n    variants: {\n      radius: { default: \"rounded-md\", full: \"rounded-full\" },\n      size: {\n        default: \"h-5 min-w-5 px-1.5 py-0.5 text-xs\",\n        lg: \"h-5.5 min-w-5.5 px-1.5 py-0.5 text-xs\",\n        sm: \"h-4.5 min-w-4.5 px-1 py-0.25 text-[0.625rem] leading-none\",\n        xl: \"h-6 min-w-6 gap-1.5 px-2 py-0.75 text-sm\",\n        xs: \"h-4 min-w-4 px-1 py-0.25 text-[0.6rem] leading-none\",\n      },\n      variant: {\n        default: \"bg-primary text-primary-foreground\",\n        destructive: \"bg-destructive text-destructive-foreground\",\n        \"destructive-light\":\n          \"border-destructive/20 bg-destructive/10 text-destructive-text\",\n        \"destructive-outline\":\n          \"border-border bg-background text-destructive-text\",\n        focus: \"bg-primary text-primary-foreground\",\n        \"focus-light\": \"border-primary/20 bg-primary/10 text-primary\",\n        \"focus-outline\": \"border-border bg-background text-primary\",\n        info: \"bg-info text-info-foreground\",\n        \"info-light\": \"border-info/20 bg-info/10 text-info-text\",\n        \"info-outline\": \"border-border bg-background text-info-text\",\n        invert: \"bg-foreground text-background\",\n        \"invert-light\": \"border-foreground/20 bg-foreground/10 text-foreground\",\n        \"invert-outline\": \"border-border bg-background text-foreground\",\n        outline: \"border-border bg-transparent text-foreground\",\n        \"primary-light\": \"border-primary/20 bg-primary/10 text-primary\",\n        \"primary-outline\": \"border-border bg-background text-primary\",\n        secondary: \"bg-secondary text-secondary-foreground\",\n        success: \"bg-success text-success-foreground\",\n        \"success-light\": \"border-success/20 bg-success/10 text-success-text\",\n        \"success-outline\": \"border-border bg-background text-success-text\",\n        warning: \"bg-warning text-warning-foreground\",\n        \"warning-light\": \"border-warning/20 bg-warning/10 text-warning-text\",\n        \"warning-outline\": \"border-border bg-background text-warning-text\",\n      },\n    },\n  }\n);\n\ntype BadgeProps = useRender.ComponentProps<\"span\"> &\n  VariantProps<typeof badgeVariants>;\n\nconst Badge = ({\n  className,\n  radius = \"default\",\n  ref,\n  render,\n  size = \"default\",\n  variant = \"default\",\n  ...props\n}: BadgeProps) => {\n  const defaultProps = {\n    className: cn(badgeVariants({ radius, size, variant }), className),\n    \"data-radius\": radius,\n    \"data-size\": size,\n    \"data-slot\": \"badge\",\n    \"data-variant\": variant,\n  };\n  return useRender({\n    defaultTagName: \"span\",\n    props: mergeProps<\"span\">(defaultProps, props),\n    ref,\n    render,\n  });\n};\n\nexport { Badge, badgeVariants };\nexport type { BadgeProps };\n",
      "type": "registry:ui"
    }
  ],
  "cssVars": {
    "theme": {
      "color-success": "var(--success)",
      "color-success-foreground": "var(--success-foreground)",
      "color-success-text": "var(--success-text)",
      "color-info": "var(--info)",
      "color-info-foreground": "var(--info-foreground)",
      "color-info-text": "var(--info-text)",
      "color-warning": "var(--warning)",
      "color-warning-foreground": "var(--warning-foreground)",
      "color-warning-text": "var(--warning-text)",
      "color-destructive-foreground": "var(--destructive-foreground)",
      "color-destructive-text": "var(--destructive-text)"
    },
    "light": {
      "success": "oklch(0.45 0.11 155)",
      "success-foreground": "oklch(0.985 0 0)",
      "success-text": "oklch(0.39 0.10 155)",
      "info": "oklch(0.47 0.14 255)",
      "info-foreground": "oklch(0.985 0 0)",
      "info-text": "oklch(0.42 0.13 255)",
      "warning": "oklch(0.80 0.15 80)",
      "warning-foreground": "oklch(0.25 0.04 70)",
      "warning-text": "oklch(0.42 0.09 70)",
      "destructive-foreground": "oklch(0.985 0 0)",
      "destructive-text": "oklch(0.48 0.18 27)"
    },
    "dark": {
      "success": "oklch(0.72 0.14 155)",
      "success-foreground": "oklch(0.20 0.02 155)",
      "success-text": "oklch(0.80 0.12 155)",
      "info": "oklch(0.72 0.12 255)",
      "info-foreground": "oklch(0.20 0.02 255)",
      "info-text": "oklch(0.80 0.10 255)",
      "warning": "oklch(0.80 0.15 80)",
      "warning-foreground": "oklch(0.25 0.04 70)",
      "warning-text": "oklch(0.84 0.12 80)",
      "destructive-foreground": "oklch(0.20 0.02 27)",
      "destructive-text": "oklch(0.80 0.13 27)"
    }
  },
  "type": "registry:ui"
}