Skip to content

leovo2708/react-numeric-textbox

Repository files navigation

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!

About

ReactJS numeric textbox component

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •