2.2.6 • Published 4 years ago

react-pinco v2.2.6

Weekly downloads
19
License
MIT
Repository
github
Last release
4 years ago

react-pinco

npm version npm codecov Build Status

A fully customizable, pincode password input component for the web built with React.

Installation

To install the latest stable version:

npm install --save react-pinco

Basic usage:

import React, { Component } from 'react';
import PincodeInput from 'react-pinco';

export default class App extends Component {
  state = {
    otp: [],
  };

  handleChange = otp => this.setState({ otp });

  render() {
    return (
      <div>
        <PincodeInput
          onChange={this.handleChange}
          numInputs={6}
          separator={<span>-</span>}
        />
      </div>
    );
  }
}

API

Development

To run the development server:

npm run dev

To run the development server for example:

npm run docs

To make a production build of the example:

npm run docs:prod

Contributing

GitHub issues GitHub pull requests

Feel free to open issues and pull requests!

License

NPM

MIT