

Every state


default


focus


too-weak


weak


good


strong


error


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "new-password" | Input id; the label, verdict and error point at it. |
| name | string | "password" | Form field name. |
| label | string | "New password" | Visible label. |
| hint | string | "Use 12 or more characters. A few random words work well." | Line under the meter before anything is typed. |
| defaultValue | string | – | Starting value. |
| score | (password: string) => { score: 0 | 1 | 2 | 3 | 4; tip?: string } | scorePassword | Scores locally; the default weighs length, kinds of characters, common words and runs. |
| verdicts | [string, string, string, string] | ["Too weak", "Weak", "Good", "Strong"] | The four verdicts, weakest first; read out politely when the level changes. |
| required | boolean | – | Marks the field required. |
| disabled | boolean | – | Disables the field. |
| error | string | – | Error message; makes the field invalid and links the message to it. |
| className | string | – | Extra classes on the outer Field. |
More password fields
All 4password-04 is in UI ProGet UI Pro, €199


