{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "badge",
  "title": "Badge",
  "description": "tag/pill/count · tint with semantic classes",
  "dependencies": [
    "@rn-primitives/slot@^1.5.2",
    "class-variance-authority@^0.7.1"
  ],
  "registryDependencies": [
    "@kit-native/lib-utils",
    "@kit-native/text"
  ],
  "files": [
    {
      "path": "components/ui/badge.tsx",
      "content": "import { TextClassContext } from '@/components/ui/text';\nimport { cn } from '@/lib/utils';\nimport { Slot } from '@rn-primitives/slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Platform, View } from 'react-native';\n\nconst badgeVariants = cva(\n  cn(\n    'border-border group shrink-0 flex-row items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5',\n    Platform.select({\n      web: 'focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive w-fit whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3',\n    })\n  ),\n  {\n    variants: {\n      variant: {\n        default: cn(\n          'bg-primary border-transparent',\n          Platform.select({ web: '[a&]:hover:bg-primary/90' })\n        ),\n        secondary: cn(\n          'bg-secondary border-transparent',\n          Platform.select({ web: '[a&]:hover:bg-secondary/90' })\n        ),\n        destructive: cn(\n          'bg-destructive border-transparent',\n          Platform.select({ web: '[a&]:hover:bg-destructive/90' })\n        ),\n        outline: Platform.select({ web: '[a&]:hover:bg-accent [a&]:hover:text-accent-foreground' }),\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n    },\n  }\n);\n\nconst badgeTextVariants = cva('text-sm font-medium', {\n  variants: {\n    variant: {\n      default: 'text-primary-foreground',\n      secondary: 'text-secondary-foreground',\n      destructive: 'text-destructive-foreground',\n      outline: 'text-foreground',\n    },\n  },\n  defaultVariants: {\n    variant: 'default',\n  },\n});\n\ntype BadgeProps = React.ComponentProps<typeof View> & React.RefAttributes<View> & {\n  asChild?: boolean;\n} & VariantProps<typeof badgeVariants>;\n\nfunction Badge({ className, variant, asChild, ...props }: BadgeProps) {\n  const Component = asChild ? Slot : View;\n  return (\n    <TextClassContext.Provider value={badgeTextVariants({ variant })}>\n      <Component className={cn(badgeVariants({ variant }), className)} {...props} />\n    </TextClassContext.Provider>\n  );\n}\n\nexport { Badge, badgeTextVariants, badgeVariants };\nexport type { BadgeProps };\n",
      "type": "registry:ui",
      "target": "components/ui/badge.tsx"
    }
  ],
  "meta": {
    "exports": [
      "Badge"
    ],
    "api": "<Badge variant=\"default|secondary|destructive|outline\"><Text /></Badge>"
  },
  "docs": "Run `npx expo install --fix` afterwards so Expo SDK packages match your SDK. Needs the kit theme (`@kit-native/theme`) and `KitThemeProvider` from `@kit-native/lib-theme-context` at the root.",
  "categories": [
    "data"
  ],
  "type": "registry:ui"
}