{"id":4028,"url":"https://github.com/react-native-text-input-mask/react-native-text-input-mask","last_synced_at":"2025-12-15T02:20:18.486Z","repository":{"id":38852361,"uuid":"98738302","full_name":"react-native-text-input-mask/react-native-text-input-mask","owner":"react-native-text-input-mask","description":"Text input mask for React Native, Android and iOS","archived":false,"fork":false,"pushed_at":"2024-01-20T21:48:32.000Z","size":833,"stargazers_count":1195,"open_issues_count":82,"forks_count":308,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-10-29T13:49:38.431Z","etag":null,"topics":["android","input-mask","inputmask","mask","mask-android","mask-ios","maskededittext","maskedinput","maskedtextfield","react-native"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/react-native-text-input-mask.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-07-29T14:39:19.000Z","updated_at":"2024-10-27T08:11:23.000Z","dependencies_parsed_at":"2024-04-25T00:41:19.948Z","dependency_job_id":"5553b998-40fd-4c88-8848-0abde8713d1b","html_url":"https://github.com/react-native-text-input-mask/react-native-text-input-mask","commit_stats":{"total_commits":107,"total_committers":24,"mean_commits":4.458333333333333,"dds":0.6074766355140186,"last_synced_commit":"968654bc87064218d3d185bf6ca35faac897c230"},"previous_names":["react-native-community/react-native-text-input-mask","ivanzotov/react-native-text-input-mask"],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-text-input-mask%2Freact-native-text-input-mask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-text-input-mask%2Freact-native-text-input-mask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-text-input-mask%2Freact-native-text-input-mask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-text-input-mask%2Freact-native-text-input-mask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-native-text-input-mask","download_url":"https://codeload.github.com/react-native-text-input-mask/react-native-text-input-mask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441056,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","input-mask","inputmask","mask","mask-android","mask-ios","maskededittext","maskedinput","maskedtextfield","react-native"],"created_at":"2024-01-05T20:16:58.921Z","updated_at":"2025-12-15T02:20:18.390Z","avatar_url":"https://github.com/react-native-text-input-mask.png","language":"Kotlin","funding_links":[],"categories":["Components"],"sub_categories":["UI"],"readme":"# This repo is no longer being maintained, we recommend using [react native advanced input mask](https://github.com/IvanIhnatsiuk/react-native-advanced-input-mask) instead\n\n# react-native-text-input-mask\nText input mask for React Native on iOS and Android.\n\n\u003ca href=\"https://www.npmjs.org/package/react-native-text-input-mask\"\u003e\n  \u003cimg src=\"https://badge.fury.io/js/react-native-text-input-mask.svg\" alt=\"NPM package version.\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/react-native-community/react-native-text-input-mask/blob/master/LICENSE\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"MIT license.\" /\u003e\n\u003c/a\u003e\n\n## Examples\n\n![React Native Text Input Mask iOS](https://s3.amazonaws.com/react-native-text-input-mask/react-native-text-input-mask-ios.gif)\n![React Native Text Input Mask Android](https://s3.amazonaws.com/react-native-text-input-mask/react-native-text-input-mask-android-updated.gif)\n\n## Setup\n\n```bash\nnpm install --save react-native-text-input-mask\n\n# --- or ---\n\nyarn add react-native-text-input-mask\n```\n\n# Installation\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eFor RN \u003e= 0.60\u003c/b\u003e\u003c/summary\u003e\n\n#### iOS\n1. Configure pods (static or dynamic linking)\n\u003cdetails\u003e\n  \u003csummary\u003eStatic Library ( Podfile has no use_frameworks! ) \u003c/summary\u003e\nAdd following lines to your target in `Podfile`. Linking is not required in React Native 0.60 and above.\n\n```ruby\npod 'React-RCTText', :path =\u003e '../node_modules/react-native/Libraries/Text', :modular_headers =\u003e true\n```\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eDynamic Framework ( Podfile has use_frameworks! ) \u003c/summary\u003e\nAdd following lines to your target in `Podfile` if it doesnt exist. Linking is not required in React Native 0.60 and above.\n\n```\nuse_frameworks!\n```\n\u003c/details\u003e\n\n2. Run `pod install` in the `ios` directory.\n\n#### Android\n\nNo need to do anything.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eFor RN \u003c 0.60\u003c/b\u003e\u003c/summary\u003e\n\n### WARNING! This is no longer officially supported, these instructions are out of date and may no longer work, we recommend upgrading to a newer version of React Native.\n\n### Link\n```bash\nreact-native link react-native-text-input-mask\n```\n\n**iOS only:** you have to drag and drop `InputMask.framework` to `Embedded Binaries` in General tab of Target\n\n![](https://cdn-images-1.medium.com/max/2000/1*J0TPrRhkAKspVvv-JaZHjA.png)\n\n### Manual installation\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ `react-native-text-input-mask` and add `RNTextInputMask.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRNTextInputMask.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. Run your project (`Cmd+R`)\n\n#### Android\n\n1. Open up `android/app/src/main/java/[...]/MainActivity.java`\n  - Add `import com.RNTextInputMask.RNTextInputMaskPackage;` to the imports at the top of the file\n  - Add `new RNTextInputMaskPackage()` to the list returned by the `getPackages()` method\n2. Append the following lines to `android/settings.gradle`:\n  \t```\n  \tinclude ':react-native-text-input-mask'\n  \tproject(':react-native-text-input-mask').projectDir = new File(rootProject.projectDir, \t'../node_modules/react-native-text-input-mask/android')\n  \t```\n3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n  \t```\n      compile project(':react-native-text-input-mask')\n  \t```\n\u003c/details\u003e\n\n## Usage\n\n```javascript\nimport TextInputMask from 'react-native-text-input-mask';\n...\n\u003cTextInputMask\n  onChangeText={(formatted, extracted) =\u003e {\n    console.log(formatted) // +1 (123) 456-78-90\n    console.log(extracted) // 1234567890\n  }}\n  mask={\"+1 ([000]) [000] [00] [00]\"}\n/\u003e\n...\n```\n\n## Testing\n\n### Jest\n\nMake sure to [mock](https://jestjs.io/docs/en/manual-mocks#mocking-node-modules) the following to `jest.setup.js`:\n```javascript\njest.mock('react-native-text-input-mask', () =\u003e ({\n    default: jest.fn(),\n}))\n```\n\n## More info\n\n[RedMadRobot Input Mask Android](https://github.com/RedMadRobot/input-mask-android)\n\n[RedMadRobot Input Mask IOS](https://github.com/RedMadRobot/input-mask-ios)\n\n## Versioning\n\nThis project uses semantic versioning: MAJOR.MINOR.PATCH.\nThis means that releases within the same MAJOR version are always backwards compatible. For more info see [semver.org](http://semver.org/).\n\n## Local Development and testing\nTo use a local copy with your project, it's highly recommended to use https://github.com/wix/wml\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-text-input-mask%2Freact-native-text-input-mask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-native-text-input-mask%2Freact-native-text-input-mask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-text-input-mask%2Freact-native-text-input-mask/lists"}