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

NameTypeRequiredDefaultDescription
lengthnumberNo6Number of inputs for inserting single values.
onlyDigitsbooleanNofalseIf true, inputs would allow only digit values. Default is alphanumeric.
placeholderstringNo-Default placeholder for input elements.
errorMessagestringNo-Puts element in error state and displays the message.
onChangefunctionNo-Callback function that gets triggered on single value change.
onSubmitfunctionNo-Callback function that gets triggered when all single values are entered.