Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 887 Bytes

README.md

File metadata and controls

32 lines (25 loc) · 887 Bytes

OTP input (React & Typescript)

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.

Features

  • 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

Quick Start

  1. Clone the app:
git clone git@github.com:illianyh/react-ts-otpinput.git
  1. Install dependencies:
cd react-ts-otpinput
yarn install
  1. Run the development server:
yarn start
  1. Open http://localhost:3000 to view it in the browser.

Running Tests (Watch)

yarn test