{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "headless-checkbox", "type": "registry:ui", "title": "Headless Checkbox", "description": "Checkboxes provide the same functionality as native HTML checkboxes, without any of the styling, giving you a clean slate to design them however you'd like.", "dependencies": [ "@headlessui/react", "motion" ], "files": [ { "path": "registry/headless/checkbox/index.tsx", "content": "'use client';\n\nimport * as React from 'react';\nimport {\n Checkbox as CheckboxPrimitive,\n type CheckboxProps as CheckboxPrimitiveProps,\n} from '@headlessui/react';\nimport { motion, type HTMLMotionProps } from 'motion/react';\n\nimport { cn } from '@/lib/utils';\n\ntype CheckboxProps =\n CheckboxPrimitiveProps &\n Omit<\n HTMLMotionProps<'button'>,\n 'checked' | 'onChange' | 'defaultChecked' | 'children'\n > & {\n as?: TTag;\n };\n\nfunction Checkbox(\n props: CheckboxProps,\n) {\n const { className, as = motion.button, ...rest } = props;\n\n return (\n \n {({ checked }) => (\n \n \n \n )}\n \n );\n}\n\nexport { Checkbox, type CheckboxProps };\n", "type": "registry:ui", "target": "components/animate-ui/headless/checkbox.tsx" } ] }