{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "password-input", "dependencies": [ "lucide-react" ], "registryDependencies": [ "input" ], "files": [ { "path": "registry/new-york-v4/components/password-input.tsx", "content": "import { Eye, EyeOff } from \"lucide-react\";\nimport type { ComponentProps, Ref } from \"react\";\nimport { useState } from \"react\";\nimport { Input } from \"@/components/ui/input\";\nimport { cn } from \"@/lib/utils\";\n\ntype PasswordInputProps = Omit, \"type\"> & {\n ref?: Ref;\n passwordrules?: string;\n};\n\nexport default function PasswordInput({ className, ref, ...props }: PasswordInputProps) {\n const [showPassword, setShowPassword] = useState(false);\n\n return (\n
\n \n setShowPassword((prev) => !prev)}\n className=\"absolute inset-y-0 right-0 flex items-center rounded-r-md px-3 text-muted-foreground hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring focus-visible:outline-none\"\n aria-label={showPassword ? \"Hide password\" : \"Show password\"}\n tabIndex={-1}\n >\n {showPassword ? : }\n \n
\n );\n}\n", "type": "registry:component" } ], "type": "registry:component" }