4.2.0 • Published 12 months ago
react-native-phone-number-input-with-country-code v4.2.0
Want to show your love?
Table of Contents
Installation
$ yarn add react-native-phone-number-input-with-country-codeOR
$ npm i react-native-phone-number-input-with-country-code --saveFeatures
- :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