- Docs
- Components
- Forms
Password input
A password or a secret, with Show password. Paste always works, and there's no length cap.
- Import
- @qeetrix/react/experimental
- Status
- ExperimentalSince 0.0.4
- Renders
<input type="password">Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Playground
Every prop, live, and the code it takes.
For
import { Field } from "@qeetrix/react";
import { PasswordInput } from "@qeetrix/react/experimental";
<Field label="Password">
<PasswordInput autoComplete="current-password" />
</Field>02
To sign in
autoComplete="current-password": the password manager fills it. Show password is a pressed toggle.
<Field label="Password">
<PasswordInput autoComplete="current-password" />
</Field>03
A new one
new-password, so the manager suggests one; the description states the rule. Type with Caps Lock on to see its warning.
At least 12 characters.
<Field label="New password" description="At least 12 characters.">
<PasswordInput autoComplete="new-password" minLength={12} />
</Field>04
A secret
off for a secret that isn't the person's password, with a Copy button at its end.
Shown once. Store it in your vault.
<Field label="Client secret" description="Shown once. Store it in your vault.">
<PasswordInput autoComplete="off" readOnly defaultValue={secret} endAdornment={<CopyButton value={secret} label="Copy client secret" size="sm" />} />
</Field>