

Every state


default


focus


filled


error


sending


code


code-error


verified


filled-gb


code-us


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "phone-verify" | Base id; the number field is <id>-number and the code field <id>-code. |
| name | string | "phone" | Form field name of the number (the code is <name>Code). |
| country | "NL" | "GB" | "DE" | "BE" | "FR" | "US" | "NL" | Dial code, number grouping, length check and example number. |
| label | string | "Mobile number" | Visible label of the number field. |
| description | string | – | Help text under the number field; defaults to a line about the text message. |
| defaultNumber | string | – | Starting national number, digits or formatted (a leading 0 is dropped). |
| defaultCode | string | – | Starting code (previews). |
| step | "number" | "sending" | "code" | "verifying" | "verified" | "number" | Step to start on. |
| codeLength | number | 6 | Digits in the code. |
| resendSeconds | number | 30 | Wait before Resend code can be used again. |
| sendCode | (phone: string) => Promise<boolean> | – | Sends the code to the full number (+31612345678); resolve false to show an error. The default waits and succeeds. |
| verifyCode | (phone: string, code: string) => Promise<boolean> | – | Resolves true when the code matches. The default accepts any code but 000000. |
| onVerified | (phone: string) => void | – | Called with the full number once it is verified. |
| error | string | – | Error under the number field. |
| codeError | string | – | Error under the code field. |
| disabled | boolean | – | Disables both steps. |
| className | string | – | Extra classes on the outer wrapper. |
More phone inputs
All 3phone-input-03 is in UI ProGet UI Pro, €199

