Dot Password
The meter judges a password the way an attacker would: common passwords however they're spelled, runs like 1234, repeats and your own name count for little, so P@ssw0rd! stays red. Under it sits the one thing most worth fixing and a checklist that ticks itself off. Show reveals what you typed, and it tells you when Caps Lock is on.
Needs: None. One small canvas; the estimate runs as you type.
Customize
autoComplete
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | – | Controlled value. Leave unset to let the field keep its own. |
| defaultValue | string | "" | Starting value, when uncontrolled. |
| onChange | (value, strength: { score: 0–4; bits; hint }) => void | – | Called as it's typed, with the estimate. |
| label | string | "Password" | The field's label. |
| name | string | "password" | Name for the form. |
| avoid | string[] | "[]" | The person's name, email, the site's name: words that count for nothing. |
| rules | { id; label; test }[] | false | "length, cases, number" | The checklist under the meter. |
| autoComplete | "new-password" | "current-password" | "new-password" | current-password is for signing in, and hides the meter. |
| placeholder | string | – | Placeholder text. |
| required | boolean | – | Required in a form. |
| disabled | boolean | false | Can't be typed in. |
| pitch | number | 4 | Size of one meter dot, px. |
| className | string | – | Class on the wrapper. |
| style | CSSProperties | – | Style on the wrapper. |