Input OTP
The only lit, all-in-one Input OTP component you’ll find online. Easy to use, highly customizable, and packed with features.
Basic
Here’s the basic usage of the Input OTP component.
Preview
Code
Installation
If you hit any issues, make sure you check out the installation guide here.
Manual Installation
Sometimes, using the CLI is the way to go, so make sure you install the necessary dependencies for the components you want to use.
Anatomy
Import the components and use them as shown below, adapting the structure to fit each component.
Separator
To include a separator between the OTP input groups, use the InputOTPSeparator
component.
Preview
Code
Controlled
To control the Input OTP component, utilize the value
and onChange
props.
Preview
Code