rc-mask-input

    1.0.2 • Public • Published

    rc-mask-input


    React MaskInput Component Just for format mobile numbers, bankcard numbers, credit card numbers... Auto blank for those numbers, special for mobile devices, fix bugs when using different language input methods

    NPM version build status Test coverage gemnasium deps npm download

    Screenshots

    Development

    npm install
    npm start
    

    Example

    http://localhost:8021/examples/

    online example: http://zealot09.github.io/rc-masked-input/

    install

    rc-mask-input

    Usage

    default is mobile format, split the mobile number like 15984382312 as [3, 4, 4] auto format to 159 8438 2312

    just define group attribute

    var MaskInput = require('rc-mask-input');
    var React = require('react');
    React.render(<MaskInput />, container);

    bankcards? 622202xxxxxxxx format as the given group

    var MaskInput = require('rc-mask-input');
    var React = require('react');
    React.render(<MaskInput group={[4, 4, 4, 4, 3]} />, container);

    API

    props

    name type default description
    className String additional css class of root dom node

    Test Case

    npm test
    npm run chrome-test
    

    Coverage

    npm run coverage
    

    open coverage/ dir

    License

    rc-mask-input is released under the MIT license.

    Install

    npm i rc-mask-input

    DownloadsWeekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • guolzealot