Latest 0.8.0
Homepage https://github.com/react-native-community/react-native-text-input-mask
License MIT
Platforms ios 8.0, requires ARC
Authors

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 react-native-text-input-mask
react-native link react-native-text-input-mask

For Android it just works.

For iOS you have to drag and drop InputMask framework to Embedded Binaries in General tab of Target and check ‘Yes’ in ‘Always Embed Swift Standard Libraries’ of Build Settings.


For RN 0.47 use 0.3.2 version – npm install --save [email protected]

Usage

import TextInputMask from '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.

Latest podspec

{
    "name": "InputMaskIOS",
    "version": "0.8.0",
    "summary": "InputMaskIOS",
    "description": "User input masking library.",
    "homepage": "https://github.com/react-native-community/react-native-text-input-mask",
    "license": "MIT",
    "authors": {
        "Egor Taflanidi": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Eaffy/rn-text-input-mask-ios.git",
        "tag": "0.8.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "InputMask/Classes/**/*"
}

Pin It on Pinterest

Share This