react-native-phone-number-input-with-country-code
v4.2.0
Published
Phone Number Input Component
Downloads
310
Maintainers
Readme
Want to show your love?
Table of Contents
Installation
$ yarn add react-native-phone-number-input-with-country-code
OR
$ npm i react-native-phone-number-input-with-country-code --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)
Props
defaultCode?
: CountryCodewithDarkTheme?
: booleanwithShadow?
: booleanautoFocus?
: booleandefaultValue?
: stringvalue?
: stringdisabled?
: booleandisableArrowIcon?
: booleanplaceholder?
: string;onChangeCountry?
: (country: Country) => void;onChangeText?
: (text: string) => void;onChangeFormattedText?
: (text: string) => void;containerStyle?
:StyleProp<ViewStyle>
;textContainerStyle?
:StyleProp<ViewStyle>
;renderDropdownImage?
:JSX.Element
;textInputProps?
: TextInputProps;textInputStyle?
:StyleProp<TextStyle>
;codeTextStyle?
:StyleProp<TextStyle>
;flagButtonStyle?
:StyleProp<ViewStyle>
;countryPickerButtonStyle
:StyleProp<ViewStyle>
;layout?
: "first" | "second";filterProps?
: CountryFilterProps;countryPickerProps?
: any;
Methods
getCountryCode
: () => CountryCodegetCallingCode
: () => string | undefinedgetNumberAfterPossiblyEliminatingZero
: () => {number: string , formattedNumber: string };isValidNumber
: (number: string) => boolean