# react-input-number

> React number input component

Latest version **5.0.19** (published 2020-05-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-input-number
pnpm add react-input-number
yarn add react-input-number
bun add react-input-number
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.19 |
| Published | 2020-05-07 |
| First published | 2015-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 11.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Wang Zuo |
| Maintainers | adjusted |
| Keywords | react, react-component, number, input |

## Links

- npm: https://www.npmjs.com/package/react-input-number
- Repository: https://github.com/swiftcarrot/react-input-number
- Homepage: https://swiftcarrot.dev/react-input-number
- Issues: https://github.com/swiftcarrot/react-input-number/issues
- npm.io page: https://npm.io/package/react-input-number

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [@emotion/core](https://npm.io/package/@emotion/core.md) ^10.0.14
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.5.5

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 5.0.19 (latest) — 2020-05-07
- 5.0.18 — 2019-07-26
- 5.0.17 — 2019-05-29
- 5.0.16 — 2019-05-24
- 5.0.15 — 2019-05-24
- 5.0.14 — 2019-05-16
- 5.0.13 — 2019-05-16
- 5.0.12 — 2019-05-16
- 5.0.11 — 2019-05-16
- 5.0.10 — 2019-05-15
- 5.0.8 — 2019-05-08
- 5.0.7 — 2019-04-24
- 5.0.6 — 2019-04-03
- 5.0.5 — 2019-03-21
- 5.0.4 — 2019-03-15
- … 34 more at https://npm.io/package/react-input-number/versions

## README

# react-input-number

[![npm](https://img.shields.io/npm/v/react-input-number.svg)](https://www.npmjs.com/package/react-input-number)
[![npm](https://img.shields.io/npm/dm/react-input-number.svg)](https://www.npmjs.com/package/react-input-number)
[![Build Status](https://travis-ci.org/swiftcarrot/react-input-number.svg?branch=master)](https://travis-ci.org/swiftcarrot/react-input-number)
[![codecov](https://codecov.io/gh/swiftcarrot/react-input-number/branch/master/graph/badge.svg)](https://codecov.io/gh/swiftcarrot/react-input-number)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

React number input component

### Installation

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

### Demo

[https://swiftcarrot.dev/react-input-number](https://swiftcarrot.dev/react-input-number)

### Basic usage

```javascript
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

---
_Source: https://npm.io/package/react-input-number · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
