https://github.com/leovo2708/react-numeric-textbox
ReactJS numeric textbox component
https://github.com/leovo2708/react-numeric-textbox
component numeric reactjs reactjs-components textbox
Last synced: 7 months ago
JSON representation
ReactJS numeric textbox component
- Host: GitHub
- URL: https://github.com/leovo2708/react-numeric-textbox
- Owner: leovo2708
- Created: 2018-09-04T08:48:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T11:51:20.000Z (about 3 years ago)
- Last Synced: 2025-05-31T09:14:42.826Z (9 months ago)
- Topics: component, numeric, reactjs, reactjs-components, textbox
- Language: JavaScript
- Homepage:
- Size: 988 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-numeric-textbox
An ReactJS numeric textbox component
## Dependencies
* [ReactJS](https://reactjs.org/)
* [Lodash](https://lodash.com)
* [Numeral](http://numeraljs.com)
## Demo
[https://leovo2708.github.io/react-numeric-textbox/](https://leovo2708.github.io/react-numeric-textbox/)
## Installation
After install the above dependencies, install `react-numeric-textbox` via:
```shell
npm install react-numeric-textbox --save
```
## Usage
```js
this.onChange(event)}
onFocus={() => this.onFocus(event)}
onBlur={() => this.onBlur(event)}
onEnter={() => this.onEnter(event)}
onEscape={() => this.onEscape(event)}
/>
```
## API
```js
const propTypes = {
className: PropTypes.string,
min: PropTypes.number,
max: PropTypes.number,
value: PropTypes.number,
placeholder: PropTypes.string,
decimals: PropTypes.number,
disabled: PropTypes.bool,
format: PropTypes.string,
autoCorrect: PropTypes.bool,
onChange: PropTypes.func,
onFocus: PropTypes.func,
onBlur: PropTypes.func,
onEnter: PropTypes.func,
onEscape: PropTypes.func
};
```
* format string: [http://numeraljs.com/#format](http://numeraljs.com/#format)
## Contributing
I am very appreciate for your ideas, proposals and found bugs which you can leave in github issues. Thanks in advance!