PasswordInput

Password field with reveal toggle + 4-bar strength meter. The built-in scorer checks length, mixed case, digits, and symbols — override with your own strength() for stricter or zxcvbn-style policies.

Type a password — the meter scores it 0–4. Click the eye to toggle visibility.

Usage

import { PasswordInput } from '@bwo-ui/react';

<PasswordInput
  placeholder="At least 8 characters"
  onChange={(e) => setPassword(e.target.value)}
/>

// Custom scorer — return { score: 0..4, label }
<PasswordInput
  strength={(v) => myZxcvbn(v)}
  error={errors.password}
/>

Props

PropTypeDefaultDescription
toggleablebooleantrueShow the eye reveal button.
meterbooleantrueRender the 4-bar strength meter.
strength(value: string) => { score: 0..4; label: string }Custom strength function.
errorstringError message rendered below the field.