Password Input
Password field with a button to show or hide it.
Installation
pnpm dlx shadcn@latest add @paneui/password-inputUsage
Examples
Accessibility
The reveal button is labelled "Show password" / "Hide password" and reports aria-pressed. Inside a Field the input is wired like any other control.
PasswordInput
Also accepts every prop of Input.
- size= "default"
- "xs" | "sm" | "default" | "lg"
- Same heights as Input; the reveal button shrinks with it.
- revealed
- boolean
- Controlled visibility.
- defaultRevealed= false
- boolean
- Initial visibility.
- onRevealedChange
- (revealed: boolean) => void
- Called when the eye button toggles.
| Prop | Type | Default | Description |
|---|---|---|---|
| size | "xs" | "sm" | "default" | "lg" | "default" | Same heights as Input; the reveal button shrinks with it. |
| revealed | boolean | — | Controlled visibility. |
| defaultRevealed | boolean | false | Initial visibility. |
| onRevealedChange | (revealed: boolean) => void | — | Called when the eye button toggles. |