@mypharma/react-native-text-input-mask

0.5.8 • Public • Published

react-native-text-input-mask

Text input mask for React Native on iOS and Android.

Examples

React Native Text Input Mask iOS React Native Text Input Mask Android

Setup

npm install --save @mypharma/react-native-text-input-mask
react-native link @mypharma/react-native-text-input-mask

For RN 0.47 use 0.3.2 version – npm install --save @mypharma/react-native-text-input-mask@0.3.2

Usage

import TextInputMask from '@mypharma/react-native-text-input-mask';
...
<TextInputMask
  refInput={ref => { this.input = ref }}
  onChangeText={(formatted, extracted) => {
    console.log(formatted) // +1 (123) 456-78-90
    console.log(extracted) // 1234567890
  }}
  mask={"+1 ([000]) [000] [00] [00]"}
/>
...

More info

RedMadRobot Input Mask Android

RedMadRobot Input Mask IOS

Versioning

This project uses semantic versioning: MAJOR.MINOR.PATCH. This means that releases within the same MAJOR version are always backwards compatible. For more info see semver.org.

Package Sidebar

Install

npm i @mypharma/react-native-text-input-mask

Weekly Downloads

1

Version

0.5.8

License

none

Unpacked Size

368 kB

Total Files

55

Last publish

Collaborators

  • crotalic