{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "checkbox",
  "type": "registry:component",
  "title": "Checkbox",
  "description": "The tick is drawn in one stroke and overshoots the box, like a pen would.",
  "categories": [
    "inputs"
  ],
  "dependencies": [
    "@plop-ui/react",
    "@plop-ui/fonts"
  ],
  "registryDependencies": [
    "https://plopui.com/r/plop-setup.json"
  ],
  "files": [
    {
      "path": "registry/plopui/checkbox-example.tsx",
      "type": "registry:component",
      "target": "components/plop/checkbox-example.tsx",
      "content": "\"use client\";\n\nimport { useState } from \"react\";\nimport { Checkbox } from \"@plop-ui/react\";\n\nconst people = [\"Rosa\", \"Theo\", \"Mia\"];\n\n/** Checkbox: a hand-drawn tick, with a \"select all\" that shows a dash when only some are picked. */\nexport function CheckboxExample() {\n  const [picked, setPicked] = useState<string[]>([\"Rosa\"]);\n  const all = picked.length === people.length;\n  const some = picked.length > 0 && !all;\n  return (\n    <>\n      <Checkbox checked={all} indeterminate={some} onCheckedChange={(on) => setPicked(on ? people : [])}>\n        Everyone\n      </Checkbox>\n      {people.map((name) => (\n        <Checkbox\n          key={name}\n          checked={picked.includes(name)}\n          onCheckedChange={(on) => setPicked((p) => (on ? [...p, name] : p.filter((n) => n !== name)))}\n        >\n          {name}\n        </Checkbox>\n      ))}\n      <Checkbox tickColor=\"var(--plop-leaf)\">Weekly digest, by email</Checkbox>\n    </>\n  );\n}\n"
    }
  ],
  "docs": "Example: components/plop/checkbox-example.tsx. Docs: https://plopui.com/docs/components/checkbox"
}
