{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"shadcn-studio/input-26","type":"registry:component","title":"Input 26","description":"A password input field with a toggle button to show/hide password visibility","dependencies":["lucide-react"],"registryDependencies":["button","input-group","label"],"files":[{"path":"src/registry/new-york/components/input/input-26.tsx","content":"'use client'\n\nimport { useId, useState } from 'react'\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react'\n\nimport { Button } from '@/registry/new-york/ui/button'\nimport { InputGroup, InputGroupAddon, InputGroupInput } from '@/registry/new-york/ui/input-group'\nimport { Label } from '@/registry/new-york/ui/label'\n\nconst InputPasswordDemo = () => {\n  const [isVisible, setIsVisible] = useState(false)\n\n  const id = useId()\n\n  return (\n    <div className='w-full max-w-xs space-y-2'>\n      <Label htmlFor={id}>Password input</Label>\n      <InputGroup>\n        <InputGroupInput id={id} type={isVisible ? 'text' : 'password'} placeholder='Password' />\n        <InputGroupAddon align='inline-end'>\n          <Button\n            variant='ghost'\n            size='icon'\n            onClick={() => setIsVisible(prevState => !prevState)}\n            className='text-muted-foreground focus-visible:ring-ring/50 rounded-l-none hover:bg-transparent'\n          >\n            {isVisible ? <EyeOffIcon /> : <EyeIcon />}\n            <span className='sr-only'>{isVisible ? 'Hide password' : 'Show password'}</span>\n          </Button>\n        </InputGroupAddon>\n      </InputGroup>\n    </div>\n  )\n}\n\nexport default InputPasswordDemo\n","type":"registry:component","target":"components/shadcn-studio/input/input-26.tsx"}]}