Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

numberinput

yaoang31MIT0.9.10

A number input component for react project

react, number, input, number-input, react-numberinput, react-number-input

readme

NumberInput

Author: yaoang

A mobile number input component for react project

How to use

First, you must install this component

npm install --save inputnumber

secondly import in your page

import NumberInput from 'numberinput'

and then use in your page

<NumberInput 
    value={value} 
    onChange={this.handleChange}
    className={yourClassName}
    prefixCls={yourPrefixCls}
    defaultStyle={true}
    isCycle={false}
    type="number"
    min={0}
    max={100}
    step={1} />

Parameters

  • className: default value is '**${prefixCls}\numberInput**_'
  • prefixCls: default value is 'fy'
  • defaultStyle: use the default style file given by author, default value is 'true'
  • isCycle: when touch the top or the bottom, it will start from the opposite, default value is 'false'
  • type: values in {"number", "time"}, default value is 'number'
handleChange(evt) {
    /* Your change event here */
    const value = evt.target.value;
}