Package Exports
- react-numberinput
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-numberinput) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Set of input tools for formatting
This project allow to create mask input easily. In real world you often need to create input for credit card, phone number or birthday date etc. Each of this usecases require to input value with some formatting (for example 0000-0000-000-0000 for credit card) and with static length. This project is going to help you.
Watch demo: http://xnimorz.github.io/masked-input/
See all components at https://github.com/xnimorz/masked-input
Components
react-numberinput
Component that allow to format only numbers.
Installation
npm install --save react-numberinputThis 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
import NumberInput from 'react-numberinput';
ReactDOM.render(
someElement,
<NumberInput />
)Props
All of passed props is applying to maskInput directly. See maskInput for more information. Note if you using reformat function maskChar, maskString, mask will be ignored.
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request
Changelog
0.1.9 Use input-core@0.1.2, react-maskinput@0.1.8
0.1.8 Add iOS@9 support
0.1.7 Fix minor bug with backspace
0.1.6 Do not remove leading zeros while input is editing
0.1.3 Add onFocus and onBlur callbacks. Add getReference function to examples
0.1.2 Add android support, remove transform-react-jsx from mask-input build
0.1.1 Remove "0" on start
0.1.0 First publish
TODO
- Cover all input-core with unit tests
- Dynamically change props in demo page
License
MIT