0.0.1-11 • Published 6 years ago

@beroburny/react-number-input v0.0.1-11

Weekly downloads
15
License
MIT
Repository
github
Last release
6 years ago

React Number Input

Best component library to provide great developer and user experience for number inputs.

Still in development

npm peer dependency version npm npm David Build Status codecov Known Vulnerabilities GitHub license

Installation

with npm
npm i @beroburny/react-number-input
with yarn
yarn add @beroburny/react-number-input

Component's

FormattedNumberInput (alias CurrencyInput)

Provide formatted values to provide better visual representation of imputed number.
(format number 10000000.3 to be like 10,000,000.30)

Props

PropsRequiredType
valuenumber
separatorType'eu' or 'us'
minimumFractionDigitsnumber
maximumFractionDigitsnumber
onChange(value: number) => void

and standard props from input field

Basic usage

import React from 'react';
import ReactDOM from 'react-dom';
import {CurrencyInput} from '@beroburny/react-number-input';

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

  return (<CurrencyInput value={value} onChange={setValue} />);
};

ReactDOM.render(<App />, document.getElementById('root'));

Changelog (latest)

  • improve handling '0' at first place
  • small bug fixes
  • fix package vulnerabilities
    entire changelog
0.0.1-11

6 years ago

0.0.1-10

6 years ago

0.0.1-9

6 years ago

0.0.1-8

6 years ago

0.0.1-7

6 years ago

0.0.1-6

6 years ago

0.0.1-5

6 years ago

0.0.1-4

6 years ago

0.0.1-3

6 years ago

0.0.1-2

6 years ago

0.0.1-1

6 years ago

0.0.1-0

6 years ago