0.1.1 • Published 4 years ago
react-hook-pin-input v0.1.1
react-hook-pin-input
🎉A pin code input
Live demo
Install
npm install --save react-hook-pin-input
Usage
import React, { Component } from 'react';
import PinInput from 'react-hook-pin-input';
class Example extends Component {
render() {
return <PinInput />;
}
}
PropTypes
Key | Type | Desc |
---|---|---|
type | text | one of number or text |
fields | number | The count of characters |
onChange | func | Trigger on character change |
onComplete | func | Trigger on all character inputs |
fieldWidth | number | input width |
fieldHeight | number | input height |
autoFocus | bool | auto focus first input on init |
className | string | class name |
values | array | default values |
License
MIT © elevensky