Officina UI
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

PropTypeDefaultDescription
hideLabelstringHide passwordAccessible label for the reveal toggle (hide state).
invalidboolean—Mark the field invalid for validation styling.
revealLabelstringShow passwordAccessible label for the reveal toggle (show state).
showStrengthboolean—Show a live password-strength meter below the field.

On this page