{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"shadcn-studio/switch-09","type":"registry:component","title":"Switch 9","description":"A dual-label switch with clickable Yes/No labels that toggle the switch state","registryDependencies":["switch"],"files":[{"path":"src/registry/new-york/components/switch/switch-09.tsx","content":"'use client'\n\nimport { useId, useState } from 'react'\n\nimport { Switch } from '@/registry/new-york/ui/switch'\n\nconst SwitchDualToggleLabelDemo = () => {\n  const id = useId()\n  const [checked, setChecked] = useState(false)\n\n  const toggleSwitch = () => setChecked(prev => !prev)\n\n  return (\n    <div className='group inline-flex items-center gap-2' data-state={checked ? 'checked' : 'unchecked'}>\n      <span\n        id={`${id}-yes`}\n        className='group-data-[state=checked]:text-muted-foreground/70 cursor-pointer text-right text-sm font-medium'\n        aria-controls={id}\n        onClick={() => setChecked(false)}\n      >\n        Yes\n      </span>\n      <Switch id={id} checked={checked} onCheckedChange={toggleSwitch} aria-labelledby={`${id}-yes ${id}-no`} />\n      <span\n        id={`${id}-no`}\n        className='group-data-[state=unchecked]:text-muted-foreground/70 cursor-pointer text-left text-sm font-medium'\n        aria-controls={id}\n        onClick={() => setChecked(true)}\n      >\n        No\n      </span>\n    </div>\n  )\n}\n\nexport default SwitchDualToggleLabelDemo\n","type":"registry:component","target":"components/shadcn-studio/switch/switch-09.tsx"}]}