Components

OTPInput

An intuitive input for one-time password verification.

Logo

With Card

The OTP component only styles the input fields, leaving the surrounding interface unstyled. You can wrap it in a card or other containers to match your design.

Length

Using the length prop, you can adjust the number of OTP input fields to match your desired length.

onComplete

The onComplete prop allows you to execute a function when the user has fully entered the OTP.

OTP:

Error

Handle invalid OTP inputs by using the error prop to show visual feedback when the entered OTP is incorrect.

API Reference

length

Type:

number

Number of input fields

Default:

4
onComplete

Type:

function

A function excuted after user has fully entered the OTP

Default:

classNames

Type:

object

Custom classes for checkbox elements

Default:

Properties:

input

Type:

string

Add className to the otp input

Default:

interface

Type:

string

Add className to the otp interface

Default:

radius

Type:

"md" | "lg" | "xl" | "full"

Default:

lg
error

Type:

boolean

Default:

fasle
error

Type:

"light" | "dark"

Default:

system