OTP Input - Keep React

The OTP (One-Time Password) Inputs component is a secure and intuitive interface designed to capture verification codes typically sent via SMS or email. It consists of multiple input fields that allow users to enter each digit of the OTP separately, ensuring accurate and quick entry.

Table of Contents#

Default Input OTP#

A basic OTP input component designed for straightforward entry of one-time passwords, with automatic focus shift and input validation for a smooth user experience.

Group Input OTP#

An OTP input component that groups input fields together, providing a more organized and compact layout for entering one-time passwords efficiently.

Control Input OTP#

A more advanced OTP input component with value handling.

API Reference#

Here is a list of the props that you can pass to the input OTP component:

PropertyDescriptionTypeDefault
containerClassNamecontainerClassName stylestringNone
maxLengthInput maxLengthnumber6
patternInput patternregex^\d+$

Reference#

Our OTP component is built using the input-otp package. For more information , follow the documentation input-otp.