{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"shadcn-studio/checkbox-02","type":"registry:component","title":"Checkbox 2","description":"Indeterminate checkbox with custom styling and three-state functionality","dependencies":["radix-ui","lucide-react"],"registryDependencies":["label"],"files":[{"path":"src/registry/new-york/components/checkbox/checkbox-02.tsx","content":"'use client'\n\nimport { useId, useState, type ComponentProps } from 'react'\n\nimport { CheckIcon, MinusIcon } from 'lucide-react'\n\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui'\n\nimport { Label } from '@/registry/new-york/ui/label'\n\nconst Checkbox = (props: ComponentProps<typeof CheckboxPrimitive.Root>) => {\n  return (\n    <CheckboxPrimitive.Root\n      data-slot='checkbox'\n      className='peer group border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:text-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary size-4 shrink-0 rounded border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50'\n      {...props}\n    >\n      <CheckboxPrimitive.Indicator\n        data-slot='checkbox-indicator'\n        className='flex items-center justify-center text-current transition-none'\n      >\n        <MinusIcon className='hidden size-2.5 group-data-[state=indeterminate]:block' />\n        <CheckIcon className='hidden size-3.5 group-data-[state=checked]:block' />\n      </CheckboxPrimitive.Indicator>\n    </CheckboxPrimitive.Root>\n  )\n}\n\nconst CheckboxIndeterminateDemo = () => {\n  const [checked, setChecked] = useState<CheckboxPrimitive.CheckedState>('indeterminate')\n\n  const id = useId()\n\n  return (\n    <div className='flex items-center gap-2'>\n      <Checkbox id={id} checked={checked} onCheckedChange={setChecked} />\n      <Label htmlFor={id}>Indeterminate checkbox</Label>\n    </div>\n  )\n}\n\nexport default CheckboxIndeterminateDemo\n","type":"registry:component","target":"components/shadcn-studio/checkbox/checkbox-02.tsx"}]}