Gathering detailed insights and metrics for react-native-phone-number-input
Gathering detailed insights and metrics for react-native-phone-number-input
Gathering detailed insights and metrics for react-native-phone-number-input
Gathering detailed insights and metrics for react-native-phone-number-input
react-phone-number-input
Telephone number input React component
libphonenumber-js
A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript
react-native-international-phone-number
International mobile phone input component with mask for React Native
react-phone-input-2
A react component to format phone numbers
npm install react-native-phone-number-input
54.7
Supply Chain
54.7
Quality
67
Maintenance
50
Vulnerability
94.8
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
377 Stars
39 Commits
219 Forks
4 Watching
16 Branches
3 Contributors
Updated on 25 Nov 2024
JavaScript (37.27%)
Java (24.28%)
Objective-C (18.85%)
TypeScript (14.63%)
Ruby (2.61%)
Starlark (2.36%)
Cumulative downloads
Total Downloads
Last day
-4.4%
7,362
Compared to previous day
Last week
-3.2%
37,148
Compared to previous week
Last month
15.4%
161,286
Compared to previous month
Last year
65.2%
1,369,913
Compared to previous year
2
1
Performance oriented React Native Phone Number Input with typings and proper validation for any country.
Click on 🌟 button.
1$ yarn add react-native-phone-number-input
OR
1$ npm i react-native-phone-number-input --save
For more complete example open App.tsx
1import React, { useState, useRef } from "react"; 2import { 3 SafeAreaView, 4 StyleSheet, 5 View, 6 StatusBar, 7 TouchableOpacity, 8 Text, 9} from "react-native"; 10import PhoneInput from "react-native-phone-number-input"; 11import { Colors } from "react-native/Libraries/NewAppScreen"; 12 13const App: React.FC = () => { 14 const [value, setValue] = useState(""); 15 const [formattedValue, setFormattedValue] = useState(""); 16 const [valid, setValid] = useState(false); 17 const [showMessage, setShowMessage] = useState(false); 18 const phoneInput = useRef<PhoneInput>(null); 19 return ( 20 <> 21 <StatusBar barStyle="dark-content" /> 22 <View style={styles.container}> 23 <SafeAreaView style={styles.wrapper}> 24 {showMessage && ( 25 <View style={styles.message}> 26 <Text>Value : {value}</Text> 27 <Text>Formatted Value : {formattedValue}</Text> 28 <Text>Valid : {valid ? "true" : "false"}</Text> 29 </View> 30 )} 31 <PhoneInput 32 ref={phoneInput} 33 defaultValue={value} 34 defaultCode="DM" 35 layout="first" 36 onChangeText={(text) => { 37 setValue(text); 38 }} 39 onChangeFormattedText={(text) => { 40 setFormattedValue(text); 41 }} 42 withDarkTheme 43 withShadow 44 autoFocus 45 /> 46 <TouchableOpacity 47 style={styles.button} 48 onPress={() => { 49 const checkValid = phoneInput.current?.isValidNumber(value); 50 setShowMessage(true); 51 setValid(checkValid ? checkValid : false); 52 }} 53 > 54 <Text>Check</Text> 55 </TouchableOpacity> 56 </SafeAreaView> 57 </View> 58 </> 59 ); 60}; 61 62export default App;
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;getCountryCode
: () => CountryCodegetCallingCode
: () => string | undefinedgetNumberAfterPossiblyEliminatingZero
: () => {number: string , formattedNumber: string };isValidNumber
: (number: string) => booleanYES
Upgrade versions['Flipper'] ||= '~> 0.37.0'
in podfile.
To get started...
Option 1
Option 2
https://github.com/garganurag893/react-native-phone-number-input
https://github.com/garganurag893/react-native-phone-number-input
.Reach out to me at one of the following places!
Looking for a React/React-Native Freelance Expert? Email at garganurag893@gmail.com
No vulnerabilities found.
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/26 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
44 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More