diff --git a/apps/v4/registry/new-york-v4/ui/input.tsx b/apps/v4/registry/new-york-v4/ui/input.tsx index 89169058d05..5e4d0335edd 100644 --- a/apps/v4/registry/new-york-v4/ui/input.tsx +++ b/apps/v4/registry/new-york-v4/ui/input.tsx @@ -1,21 +1,59 @@ +"use client" + import * as React from "react" +import { Eye, EyeOff } from "lucide-react" import { cn } from "@/lib/utils" -function Input({ className, type, ...props }: React.ComponentProps<"input">) { - return ( +type InputProps = React.ComponentProps<"input"> & { + showPasswordToggle?: boolean +} + +function Input({ + className, + type, + showPasswordToggle = true, + ...props +}: InputProps) { + const [show, setShow] = React.useState(false) + + const isPassword = type === "password" && showPasswordToggle + + // Build the main input + const inputElement = ( ) + + // If not password-type → return plain input + if (!isPassword) return inputElement + + // Otherwise render wrapper with toggle + return ( +