2.2.6 • Published 6 years ago
react-pinco v2.2.6
react-pinco
A fully customizable, pincode password input component for the web built with React.
Installation
To install the latest stable version:
npm install --save react-pincoBasic 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 devTo run the development server for example:
npm run docsTo make a production build of the example:
npm run docs:prodContributing
Feel free to open issues and pull requests!
License
MIT