Password Toggle Field
stableA password input with a show / hide toggle.
Basic usage
Examples
With label and strength hint
Wrap in a field layout and add a password strength message.
Use at least 8 characters with letters and numbers.
Password form field
Combine the root, input and toggle parts with labels and helper text.
Use at least 12 characters.
Features
- Accessible visibility toggle.
- Controlled or uncontrolled.
Installation
bash
pnpm dlx structyl add password-toggle-fieldAPI Reference
PasswordToggleField.Root
A password input with a visibility toggle.
| Prop | Type | Default |
|---|---|---|
| visible | booleanControlled visibility. | — |
| onVisibleChange | (visible: boolean) => voidCalled when visibility changes. | — |
PasswordToggleField.Input
The password input.
| Prop | Type | Default |
|---|
PasswordToggleField.Toggle
The show / hide button.
| Prop | Type | Default |
|---|