An input optimized for password and other sensitive-value entry. Renders a native <input type="password"> with a built-in trailing button that toggles between hidden (••••) and revealed (text) display.
Input.The toggle is uncontrolled by default. Pass showValue to control the visibility from the outside (useful when one UI control toggles multiple password fields), and onValueVisibilityChange to be notified when the user toggles via the built-in button.
Always pair with a Label. The toggle button has its own accessible name announcing the current state. The input keeps autocomplete="current-password" / "new-password" semantics — set autoComplete explicitly per flow.
When revealed, the input switches to type="text" — some password managers may pause autofill in this state, which is the intended security tradeoff.
1import { Label } from "@ngrok/mantle/label";2import { PasswordInput } from "@ngrok/mantle/input";3 4<div className="flex w-full max-w-64 flex-col gap-1.5">5 <Label htmlFor="password">Password</Label>6 <PasswordInput id="password" />7</div>8<div className="flex w-full max-w-64 flex-col gap-1.5">9 <Label htmlFor="password-error">Password (error)</Label>10 <PasswordInput id="password-error" validation="error" />11</div>The PasswordInput accepts the following props in addition to the standard HTML input attributes.