The simplest numerical component for React. If you get bored numerical conversion and other problems in html input, it is suits you perfectly.
import React, { useState } from 'react';
import InputNumber from 'input-number';
function App () {
const [value, setValue] = useState(null);
return (
<InputNumber
value={value}
onChange={setValue}
min={5}
max={15}
/>
);
}
name | type | default | description |
---|---|---|---|
min | Number | Specifies the minimum value. This feature trigger by onBlur | |
max | Number | Specifies the maximum value. This feature trigger by onBlur | |
value | Number | Specifies the value of an InputNumber | |
onChange | Function | Called when value of an InputNumber changed |