1.0.1 • Published 2 years ago

react-otp-input-2 v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-otp-input-2

Updated version of react-otp-input with bug fixes.

NPM JavaScript Style Guide

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