Password Input
UI SDK PasswordInput styled as a field: a reveal toggle as an icon button with a tooltip that keeps its name while aria-pressed says whether the password shows, floating labels and FormField binding.
Example
Show password
At least 12 characters.
password-input-demo.tsxCopy code
Installation
Copy code
Usage
ImportCopy code
API reference
PasswordInput
PasswordInputControl
PasswordInputToggle
| Prop | Type | Default |
|---|---|---|
tooltip | ControlTooltipOption | – |
Also takes every prop of UI SDK PasswordInputToggle.
Other exports
createPasswordInputControllertype PasswordInputControllertype PasswordInputStatetype PasswordInputVisibleChangeReasonAccessibility
- A native password field named by its Field label, so password managers and autofill work.
- The toggle is a toggle button named "Show password" whose aria-pressed says whether the password shows; its name never flips.
- A pointer press on the toggle keeps the caret in the field; submitting or leaving the page hides the password again.
Agent actions
Agents find it by its label, set the value and show or hide it with toggleVisible.
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.