1.0.9 • Published 4 years ago
react-individual-input-box v1.0.9
react-individual-input-box
React component for individual character input box
Example
Install
npm install --save react-individual-input-box
Usage
import * as React from "react";
import InputBox from "react-individual-input-box";
class Example extends React.Component {
render() {
return (
<InputBox
size={4}
value={this.value}
onChange={() => this.onChange()}
isPassword
onlyNumbers
/>
);
}
}
Props
Common props you may want to specify include:
size
- number of input boxesvalue
- control the current valueisPassword
- apply password dots to hide input dataonlyNumber
- allow only numbersisConfirmInput
- allow use the input box component two times in screent as a confirm data inputonChange
- subscribe to change events
License
MIT © lucasga