Skip to content
/ otp Public

Minimalistic one-time password component for React, built with Tailwind and Typescript.

License

Notifications You must be signed in to change notification settings

driaug/otp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OTP Component

A minimalistic one-time password component for React, built with Tailwind and Typescript.

Includes support for various OTP needs such as:

  • 🗑️ Backspace & delete
  • 🖨️ Copy & Paste
  • ⇥ Accessibility with tab

Alt text

Basic Usage

<OTP onComplete={(otp) => console.log(otp)} />

Parameters

Parameter Type Use
onComplete (otp) => void; Function that will trigger once the password is filled in
length number Number of boxes, defaults to 6
disabled boolean Disables the input, defaults to false

About

Minimalistic one-time password component for React, built with Tailwind and Typescript.

Topics

Resources

License

Stars

Watchers

Forks