README
react-numeric-input
Number input component with more flexible options very easy to use and you can use it with Formik 👀.
Installation
npm install @deberoppa/react-numeric-input --save
Add it to your script like this:
// es6
import RNI from '@deberoppa/react-numeric-input';
Usage
Basic usage:
<RNI/>
// Or to add class:
<RNI className="my-custom-class1"/>
Common usage:
Most of the time you will need to specify min, max, value and step like the native numeric input.
<RNI min={0} max={100} step={5} value={60}/>
Floats usage :
You can use step and precision props to make the input working with floating point numbers.
<RNI step={0.25} precision={2} value={30.25}/>
Mobile mode :
In the mobile the input must change display so the click on the buttons will be comfortable.
<RNI mobile={true}/>
Adding prefix or suffix to the output:
You can add prefix or suffix to the value like this:
// Prefix
<RNI prefix="