react-otp-component
v1.0.3
Published
A fully customizable, one-time password input component for the web built with React
Downloads
37
Readme
react-otp-component
A fully customizable, one-time password input component for the web built with React.
Installation
To install the latest stable version:
npm install --save react-otp-component
Basic usage:
import React, { Component } from 'react';
import OtpComponent from 'react-otp-component';
export default class App extends Component {
state = {
otp: '',
};
onOtpChange = (value) => {
this.setState({ otp: value });
}
render() {
return (
<div>
<OtpComponent completeOtpEntered={this.onOtpChange} />
</div>
);
}
}