Components
PasswordInput
Password field with a show/hide toggle and an optional live strength meter.
PasswordInput is an Input with a built-in reveal toggle that switches the
field between password and text. Set showStrength to render a live strength
meter below it that scores length, case, digits, and symbols. It forwards its ref
and accepts all native input props (minus type), so wire value/onChange as
usual; customize the toggle's accessible labels with revealLabel and
hideLabel.
Example
Preview
0%
import { PasswordInput } from '@officina/ui';
import { useState } from 'react';
function Example() {
const [value, setValue] = useState('');
return <PasswordInput showStrength value={value} onChange={(e) => setValue(e.target.value)} />;
}API
| Prop | Type | Default | Description |
|---|---|---|---|
| hideLabel | string | Hide password | Accessible label for the reveal toggle (hide state). |
| invalid | boolean | — | Mark the field invalid for validation styling. |
| revealLabel | string | Show password | Accessible label for the reveal toggle (show state). |
| showStrength | boolean | — | Show a live password-strength meter below the field. |