0.0.1 • Published 8 years ago

@hnordt/reax-mask-input v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

Reax Mask Input

Bootstrap Mask Input component for React

npm version

BETA

This library is still in BETA

PropTypes

{
  name: PropTypes.string,
  mask: PropTypes.string.isRequired,
  reverse: PropTypes.bool,
  value: PropTypes.string,
  autoFocus: PropTypes.bool,
  readOnly: PropTypes.bool,
  disabled: PropTypes.bool,
  onFocus: PropTypes.func,
  onChange: PropTypes.func,
  onBlur: PropTypes.func
}

Important: for mask options look at jQuery Mask Plugin Documentation

Usage

npm install --save @hnordt/reax-mask-input
import React from 'react';
import MaskInput from '@hnordt/reax-mask-input';

const Foo = () => (
  <MaskInput
    mask="(000) 000-0000"
    onChange={event => console.log(event.target.value)} />
);

export default Foo;