react-numberinput
DEMO: https://xnimorz.github.io/masked-input/
Component that allow to format only numbers. (5 000
, 123 456 789
, etc.)
Installation
npm install --save react-numberinput
or
yarn add react-numberinput
This component work on top of react-maskinput and define custom formatting function called reformat
. Also you can use this component as example to create you own components based on react-maskinput.
Usage
; ReactDOM;
You also can set up different input element properties, such as class, data-attributes, etc. This component works well with another libraries, styled-components as example:
;;; const StyledNumberInput = ` border-radius: 10px; border-color: rgb(219, 112, 147);`; ;
Props
See https://github.com/xnimorz/masked-input/tree/master/packages/react-maskinput#props
License
MIT