0.0.10-beta • Published 5 years ago

react-optinput v0.0.10-beta

Weekly downloads
90
License
MIT
Repository
github
Last release
5 years ago

React otpinput

npm_version

Installation

To install the latest version:

npm install --save react-optinput

Basic usage:

import React from 'react';
import ReactDOM from 'react-dom';
import OtpInput from 'react-optinput';
import 'react-optinput/bundle.css';

class Demo extends React.Component {
  render() {
    return (
      <div>
        <OtpInput
          codeLength={5}
          onInputChange={value => {
            console.log(value);
          }}
        />
      </div>
    );
  }
}
ReactDOM.render(<Demo />, document.getElementById('root'));

API

First beta v0.0.3-beta

This beta version is created to demostrate implementing otp/code/pin code input with react in a simpler way. The demo is created using webpack as building base. The package is packed with rollup. It was initially packed using webpack. During the stage of experiements, rollup shows a clear and simpler manner in module bundler. Dev dependencies and peer dependencies are available for reference in react-optinput. You may need peer dependecies react and react-dom for development purpose. Currently, default style is provided with import 'react-optinput/bundle.css'.

For you to try

To run the development server:

npm run dev

Checklist

  • -x Add ESlint, Prettier for code quality
  • - Customize style support
  • - CI
  • - Unit tests

License

MIT

0.0.10-beta

5 years ago

0.0.9-beta

5 years ago

0.0.8-beta

5 years ago

0.0.7-beta

5 years ago

0.0.6-beta

5 years ago

0.0.5-beta

5 years ago

0.0.3-beta

5 years ago

0.0.4-beta

5 years ago

0.0.2

5 years ago

0.0.2-beta

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago