{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "checkbox",
  "title": "Checkbox",
  "type": "registry:ui",
  "files": [
    {
      "path": "packages/registry-native/components/checkbox/Checkbox.tsx",
      "content": "import * as React from 'react'\nimport { Pressable, View, type PressableProps } from 'react-native'\nimport { Check } from 'lucide-react-native'\nimport { cn } from '@/lib/utils'\nimport { useThemeColors } from '@/lib/theme'\n\nexport interface CheckboxProps extends Omit<PressableProps, 'children'> {\n  className?: string\n  checked?: boolean\n  defaultChecked?: boolean\n  onCheckedChange?: (checked: boolean) => void\n}\n\nconst Checkbox = React.forwardRef<React.ComponentRef<typeof Pressable>, CheckboxProps>(\n  ({ className, checked, defaultChecked, onCheckedChange, onPress, disabled, accessibilityState, ...props }, ref) => {\n    const colors = useThemeColors()\n    const isControlled = checked !== undefined\n    const [internal, setInternal] = React.useState(defaultChecked ?? false)\n    const resolved = checked ?? internal\n\n    function handlePress(event: Parameters<NonNullable<PressableProps['onPress']>>[0]) {\n      if (disabled) return\n      const next = !resolved\n      if (!isControlled) setInternal(next)\n      onCheckedChange?.(next)\n      onPress?.(event)\n    }\n\n    return (\n      <Pressable\n        ref={ref}\n        accessibilityRole=\"checkbox\"\n        accessibilityState={{ ...accessibilityState, checked: resolved, disabled: !!disabled }}\n        disabled={disabled}\n        onPress={handlePress}\n        className={cn(\n          'size-[48px] shrink-0 items-center justify-center active:opacity-80',\n          disabled && 'opacity-50',\n          className,\n        )}\n        {...props}\n      >\n        <View\n          pointerEvents=\"none\"\n          className={cn(\n            'size-[20px] items-center justify-center rounded-sm border',\n            resolved ? 'border-primary bg-primary' : 'border-input bg-background',\n          )}\n        >\n          {resolved ? <Check size={14} strokeWidth={3} color={colors.primaryForeground} /> : null}\n        </View>\n      </Pressable>\n    )\n  },\n)\nCheckbox.displayName = 'Checkbox'\n\nexport { Checkbox }\n",
      "type": "registry:ui",
      "target": "~/components/ui/checkbox/Checkbox.tsx"
    },
    {
      "path": "packages/registry-native/components/checkbox/index.ts",
      "content": "export { Checkbox, type CheckboxProps } from './Checkbox'\n",
      "type": "registry:ui",
      "target": "~/components/ui/checkbox/index.ts"
    }
  ],
  "dependencies": [
    "lucide-react-native",
    "react-native-svg"
  ],
  "devDependencies": [],
  "registryDependencies": [],
  "description": "Controlled or uncontrolled checkbox (Pressable, checkbox role) with a 44pt hit area around a 20pt box. Uses the Lucide check glyph. Requires react-native-svg (lucide-react-native peer, a native module — run pod install on bare RN after adding).",
  "categories": [
    "control"
  ]
}