react-otp-input-2
v1.0.1
Published
Updated version of react-otp-input with bug fixes.
Downloads
31
Maintainers
Readme
react-otp-input-2
Updated version of react-otp-input with bug fixes.
Install
npm install --save react-otp-input-2
Usage
import React, { Component } from 'react';
import OtpInput from 'react-otp-input';
export default class App extends Component {
state = { otp: '' };
handleChange = (otp) => this.setState({ otp });
render() {
return (
<OtpInput
value={this.state.otp}
onChange={this.handleChange}
numInputs={6}
separator={<span>-</span>}
/>
);
}
}
License
MIT © shubhlpu16