react-input-number

5.0.19 • Public • Published

react-input-number

npm npm Build Status codecov styled with prettier

React number input component

Installation

yarn add react-input-number
npm install react-input-number --save

Demo

https://swiftcarrot.dev/react-input-number

Basic usage

import React, { useState } from 'react';
import InputNumber from 'react-input-number';
 
function App() {
  const [num, setNum] = useState(2.2);
 
  return (
    <InputNumber min={10} max={100} step={0.03} value={num} onChange={setNum} />
  );
}

enableMobileNumericKeyboard

<InputNumber enableMobileNumericKeyboard /> will open a numeric keyboard on ios and android devices. Notice that on ios the keyboard doesnot contain the .(dot) character for floating numbers.

License

MIT

Package Sidebar

Install

npm i react-input-number

Weekly Downloads

3,461

Version

5.0.19

License

MIT

Unpacked Size

11.4 kB

Total Files

5

Last publish

Collaborators

  • adjusted