Licence
MIT
Version
0.0.4
Deps
0
Size
9 kB
Vulns
0
Weekly
0
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