PasswordInput
Password entry with an accessible visibility toggle.
Interactive preview
Use a unique password for this workspace.
Usage
import { PasswordInput, Label } from "@devvy-ui/react";
<Label htmlFor="password">Password</Label>
<PasswordInput id="password" name="password" autoComplete="new-password" />API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| showLabel / hideLabel | string | Show password / Hide password | Accessible toggle names. |
| value / defaultValue / autoComplete | native input props | — | Password value and credential autofill. |
Accessibility & behavior
Platform Behavior & Guidelines
The ref and native attributes target the input. A native non-submit toggle exposes aria-controls and aria-pressed, with disabled state matching the input. Keep a visible label and use an appropriate autocomplete value. Revealing changes presentation only; validation remains native/application-owned.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add password-inputMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.