Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-native-phone-number-input

> 前端框架
Open source

React Native component for phone number.

387 stars0 likes1 views
WebsiteGitHub

About

React Native component for phone number.

React Native Phone Number Input

Performance oriented React Native Phone Number Input with typings and proper validation for any country.

Made with ❤️ by developer for developers

Want to show your love?

Click on button.

Table of Contents

  • Table of Contents
  • Installation
  • Features
  • Usage
  • Props
  • Methods
  • FAQ
    • Is it supported and tested both on android and iOS?
    • NSURLResponse allHeaderFields: unrecognized selector sent to instance XX crash?
  • Contributing
    • Step 1
    • Step 2
    • Step 3
  • Support
  • License
  • Hire

Installation

bash
$ yarn add react-native-phone-number-input

OR

bash
$ npm i react-native-phone-number-input --save

Features

  • :iphone: Works with iOS and Android, Cross-platform :100:
  • :crossed_flags: Built-in country picker (uses react-native-country-picker-modal)
  • :wrench: Completely customizable UI!
  • :heavy_check_mark: Proper validation (uses google-libphonenumber)

Usage

For more complete example open App.tsx

…

Props

  • defaultCode?: CountryCode
  • withDarkTheme?: boolean
  • withShadow?: boolean
  • autoFocus?: boolean
  • defaultValue?: string
  • value?: string
  • disabled?: boolean
  • disableArrowIcon?: boolean
  • placeholder?: string;
  • onChangeCountry?: (country: Country) => void;
  • onChangeText?: (text: string) => void;
  • onChangeFormattedText?: (text: string) => void;
  • containerStyle?: StyleProp;
  • textContainerStyle?: StyleProp;
  • renderDropdownImage?: JSX.Element;
  • textInputProps?: TextInputProps;
  • textInputStyle?: StyleProp;
  • codeTextStyle?: StyleProp;
  • flagButtonStyle?: StyleProp;
  • countryPickerButtonStyle : StyleProp;
  • layout?: "first" | "second";
  • filterProps?: CountryFilterProps;
  • countryPickerProps?: any;

Methods

  • getCountryCode: () => CountryCode
  • getCallingCode: () => string | undefined
  • getNumberAfterPossiblyEliminatingZero: () => {number: string , formattedNumber: string };
  • isValidNumber: (number: string) => boolean

FAQ

Is it supported and tested both on android and iOS?

YES

NSURLResponse allHeaderFields: unrecognized selector sent to instance XX crash?

Upgrade versions['Flipper'] ||= '~> 0.37.0' in podfile.

Contributing

To get started...

Step 1

  • Option 1

    • Fork this repo!
  • Option 2

    • Clone this repo to your local machine using https://github.com/garganurag893/react-native-phone-number-input

Step 2

  • HACK AWAY!

Step 3

  • Create a new pull request using https://github.com/garganurag893/react-native-phone-number-input.

Support

Reach out to me at one of the following places!

  • Twitter at https://twitter.com/AnuragG94634191
  • Medium at https://medium.com/@garganurag893
  • Instagram at https://www.instagram.com/the_only_anurag/
  • Email at [email protected]

License

  • MIT license

Hire

Looking for a React/React-Native Freelance Expert? Email at [email protected]

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptphone-numberreactreact-nativereactjs

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架