@mvp-rockets/react-otp-input
v1.0.0-beta.3
Published
A fully customizable, one-time password input component for the web built with React
Downloads
16
Readme
@mvp-rockets/react-otp-input
A fully customizable, one-time password input component for the web built with React. This package is based on great work of contributers of react-otp-input
. But i needed this package and for unknown reasons the contributers of the original package does not accept the open PRs that solve the REACT 18 dependency problem. So based on The PR here i created this package for the others who need this.
To see the original package Click
Installation
To install the latest stable version:
npm install --save @mvp-rockets/react-otp-input
Basic usage:
import React, { useState } from 'react';
import OtpInput from '@mvp-rockets/react-otp-input';
function App() {
const [otp, setOtp] = useState('');
return (
<OtpInput
inputStyle="inputStyle"
numInputs={4}
onChange={(value) => setOtp(value)}
separator={<span>-</span>}
isInputNum={true}
shouldAutoFocus
value={otp}
/>
);
}
export default App;
API
Development
To run the development server:
npm run dev
License
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!