Skip to content

Latest commit

 

History

History
68 lines (59 loc) · 1.57 KB

README.md

File metadata and controls

68 lines (59 loc) · 1.57 KB

React Input Number

The simplest numerical component for React. If you get bored numerical conversion and other problems in html input, it is suits you perfectly.

Screenshots

Usage

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}
    />
  );
}

API

props

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
And all properties in html input.