AuthCode
The AuthCode component consists of TextInput components with additional logic that supports quick and easy one-time-password handling.
Default
Custom length
Only digits
Error state
Provided value is not valid!
Error state position
Provided value is not valid!
Provided value is not valid!
Stretch
Props
Name | Type | Required | Default | Description |
---|---|---|---|---|
length | number | No | 6 | Number of inputs for inserting single values. |
onlyDigits | boolean | No | false | If true, inputs would allow only digit values. Default is alphanumeric. |
placeholder | string | No | - | Default placeholder for input elements. |
errorMessage | string | No | - | Puts element in error state and displays the message. |
onChange | function | No | - | Callback function that gets triggered on single value change. |
onSubmit | function | No | - | Callback function that gets triggered when all single values are entered. |