1.0.7 • Published 5 years ago

react-numeric-textbox v1.0.7

Weekly downloads
65
License
MIT
Repository
github
Last release
5 years ago

react-numeric-textbox

An ReactJS numeric textbox component

Dependencies

Demo

https://leovo2708.github.io/react-numeric-textbox/

Installation

After install the above dependencies, install react-numeric-textbox via:

npm install react-numeric-textbox --save

Usage

<NumericTextboxComponent
  className={className}
  min={min}
  max={max}
  disabled={disabled}
  autoCorrect={autoCorrect}
  decimals={decimals}
  format={format}
  value={value}
  placeholder={placeholder}
  onChange={(event) => this.onChange(event)}
  onFocus={() => this.onFocus(event)}
  onBlur={() => this.onBlur(event)}
  onEnter={() => this.onEnter(event)}
  onEscape={() => this.onEscape(event)}
/>

API

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
};

Contributing

I am very appreciate for your ideas, proposals and found bugs which you can leave in github issues. Thanks in advance!