{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "radio",
  "title": "Radio",
  "description": "A native radio with its label.",
  "registryDependencies": [
    "https://creance.pages.dev/r/checkbox.json",
    "https://creance.pages.dev/r/creance-base.json"
  ],
  "files": [
    {
      "path": "radio/Radio.tsx",
      "content": "import { forwardRef, type InputHTMLAttributes, type ReactNode } from 'react';\nimport { cx } from '@/lib/creance/cx';\nimport '@/components/creance/checkbox/Checkbox.css';\n\nexport interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {\n  label: ReactNode;\n  description?: ReactNode;\n}\n\n/** A native radio with its label. Group radios with `RadioGroup` (or a `fieldset` and a shared `name`). */\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(function Radio(\n  { label, description, className, ...props },\n  ref,\n) {\n  return (\n    <label className={cx('cr-check', className)}>\n      <input ref={ref} type=\"radio\" className=\"cr-check__input\" {...props} />\n      <span className=\"cr-check__text\">\n        {label}\n        {description && <span className=\"cr-check__description\">{description}</span>}\n      </span>\n    </label>\n  );\n});\n",
      "type": "registry:ui",
      "target": "@components/creance/radio/Radio.tsx"
    }
  ],
  "categories": [
    "atom",
    "forms"
  ],
  "type": "registry:ui"
}