tl-react-numeric-input
v1.3.3
Published
React component as a numeric input field
Downloads
13
Maintainers
Readme
TLNumericInput
React component as a numeric input field
Installation
Use the package manager to install tl-react-numeric-input:
yarn add tl-react-numeric-input
# or
npm i tl-react-numeric-input
Demo
Download and unzip archive or clone with command:
git clone https://github.com/MitrofD/tl-react-numeric-input.git
Then install dependencies:
yarn install
# or
npm install
Last step run start command:
yarn run start
# or
npm run start
Usage
import TLNumericInput from 'tl-react-numeric-input';
<TLNumericInput onSet={handleOnSet} />
Your handler for the onSet event should expect a TLNumericInput. For example:
function handleOnSet(numericInput) {
this.setState({
numeric: numericInput.value
});
}
Attributes
All attributes for input with number type + optional onSet handler