react-otp-input-type
v1.0.2
Published
A customizable continuous-single-input component, which can be used for OTP/pass-code style input purposes
Downloads
11
Maintainers
Readme
react-otp-input-type
A lightweight and customizable continuous-single-input component, which can be used for OTP/pass-code style input purposes for React apps.
Installing as a package
npm i react-otp-input-type
How to use?:
import React, { useState } from 'react';
import { OTPInputField } from 'react-otp-input-type';
function App() {
const [otp, setOtp] = useState('');
return (
<div className="App">
<OTPInputField
numOfInputs = {6}
handleChange = {setOtp}
/>
<p>Entered value is: {otp}</p>
</div>
);
}
Props
License
MIT