Skip to content

nrknithin/otp-input-simple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started Simple OTP Input

Installation

In the project directory, you can run:

npm i otp-input-simple

Import

import OTPInput from "otp-input-simple";

Example

<OTPInput
    onChange={setOTP}
    value={otp}
    numInputs={6}
    seperator="-"
/>

Props

onChange: onChange function return a value
value: input value
numInputs: Number of inputs
inputStyle: style for input field eg: inputStyle={{ borderRadius: "25%", width: "50px", height: "50px", fontSize: "32px" }}
containerStyle: style for container eg: containerStyle={{ display: "flex", justifyContent: "center" }}
seperator: field seperator

About

Simple OTP Input

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors