react-pinco
v2.2.6
Published
A fully customizable, pincode password input component for the web built with React
Downloads
12
Maintainers
Readme
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-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
Feel free to open issues and pull requests!
License
MIT