

Every state


default


focus


partial


all-met


revealed


error


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "create-password" | Input id; the label, list and error point at it. |
| name | string | "password" | Form field name. |
| label | string | "Create a password" | Visible label. |
| rulesTitle | string | "Your password needs" | Heading over the list. |
| rules | { id: string; label: string; test: (password: string) => boolean }[] | length 10, lower and capital, number, symbol | The rules, each with its own test; met and not met are read out with each rule. |
| defaultValue | string | – | Starting value. |
| revealed | boolean | – | Start with the password shown. |
| error | string | – | After a failed submit: shows this message and turns unmet rules red. |
| required | boolean | – | Marks the field required. |
| disabled | boolean | – | Disables the field and the button. |
| className | string | – | Extra classes on the outer Field. |
More password fields
All 4password-02 is in UI ProGet UI Pro, €199


