# react-formatted-number-input

> A higher order component for formatting values in input elements as numbers

Latest version **2.0.0** (published 2019-09-04) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-09-04 |
| First published | 2018-02-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 74.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jonathan Svenheden |
| Maintainers | jonathanp |

## Links

- npm: https://www.npmjs.com/package/react-formatted-number-input
- Repository: https://github.com/svenheden/react-formatted-number-input
- Homepage: https://github.com/svenheden/react-formatted-number-input#readme
- Issues: https://github.com/svenheden/react-formatted-number-input/issues
- npm.io page: https://npm.io/package/react-formatted-number-input

## Recent versions

- 2.0.0 (latest) — 2019-09-04
- 1.2.4 — 2019-07-29
- 1.2.3 — 2019-04-27
- 1.2.2 — 2018-11-21
- 1.2.1 — 2018-10-12
- 1.2.0 — 2018-08-20
- 1.1.0 — 2018-06-25
- 1.0.0 — 2018-04-11
- 0.2.2 — 2018-03-11
- 0.2.1 — 2018-03-07
- 0.2.0 — 2018-02-07
- 0.1.0 — 2018-02-05

## README

# React formatted number input

A higher order component for formatting values in input elements as numbers


[![Build Status][travis-image]][travis-url]
[![Code Coverage][coverage-image]][coverage-url]
[![NPM version][npm-image]][npm-url]


## Install

```
$ npm install --save react-formatted-number-input
```


## Usage

```ts
import React from 'react';
import { createFormattedNumberInput } from 'react-formatted-number-input';

const FancyInput = React.forwardRef((props, ref) => {
  return <div><input ref={ref} {...props} /></div>;
});

const FormattedNumberInput = createFormattedNumberInput(FancyInput, { precision: 2 });

const Demo = () => {
  const [value, setValue] = React.useState();

  return <FormattedNumberInput value={value} onChange={setValue} />;
}
```


## License

MIT © [Jonathan Svenheden](https://github.com/svenheden)

[travis-image]: https://img.shields.io/travis/svenheden/react-formatted-number-input.svg
[travis-url]: https://travis-ci.org/svenheden/react-formatted-number-input
[coverage-image]: https://img.shields.io/codecov/c/gh/svenheden/react-formatted-number-input.svg
[coverage-url]: https://codecov.io/gh/svenheden/react-formatted-number-input
[npm-image]: https://img.shields.io/npm/v/react-formatted-number-input.svg
[npm-url]: https://npmjs.org/package/react-formatted-number-input

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