@fiveem/react-number-input
v0.0.4
Published
React Number Input
Downloads
3
Readme
React Number Input
Screenshots
Install
npm i @fiveem/react-number-input
Usage
import NumberInput from '@fiveem/react-number-input'
<NumberInput name="value" min="0" max="20" value={this.state.value} onChange={this.onNumberInputChange} />
API
|name|type|sample value|description|
|----|----|------------|-----------|
|value|String|10px
|input value|
|units|Array|['px', 'pt', 'cm']
|array of allowed units; default: ['px', 'pt', 'in', 'cm', 'mm']
|
|name|String|number
|input label name; default value: number
|
|onChange|Function||event triggered when value change|
Models
Event
{
name: "number"
value: "1px"
}
License
react-number-input is released under the MIT license.