There are tons of OTP (one-time password) or OTC (one-time code) inputs I have seen out there, but most of them are difficult to use or doesn't give me a great user experience. In this project, I tried my best to handle some of the issues that I can see when interacting with OTP inputs.
- Pasting value that has the same length as the OTP inputs
- Using arrow keys: up, down, right and left
- Changing a single input value without interrupting the placement of other input values
- Clone the app:
git clone git@github.com:illianyh/react-ts-otpinput.git
- Install dependencies:
cd react-ts-otpinput
yarn install
- Run the development server:
yarn start
- Open http://localhost:3000 to view it in the browser.
yarn test