Gathering detailed insights and metrics for material-ui-phone-number
Gathering detailed insights and metrics for material-ui-phone-number
Gathering detailed insights and metrics for material-ui-phone-number
Gathering detailed insights and metrics for material-ui-phone-number
npm install material-ui-phone-number
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
122 Stars
95 Commits
181 Forks
5 Watching
11 Branches
19 Contributors
Updated on 20 Sept 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-7.8%
4,648
Compared to previous day
Last week
5.6%
24,961
Compared to previous week
Last month
9.3%
107,245
Compared to previous month
Last year
-13.2%
1,309,947
Compared to previous year
2
30
Highly customizable phone input component with auto formatting. Based on the wonderful react-phone-input-2 package.
It looks like this, but in Material Design:
Uses @material-ui/core/TextField for rendering the phone input
1npm install material-ui-phone-number --save
1import MuiPhoneNumber from 'material-ui-phone-number'; 2 3React.render( 4 <MuiPhoneNumber defaultCountry={'us'} onChange={handleOnChange}/>, 5 document.getElementById('root') 6);
Your handler for the onChange
event should expect a string as
parameter, where the value is that of the entered phone number. For example:
1function handleOnChange(value) {
2 this.setState({
3 phone: value
4 });
5}
Name | Type | Description | Example |
---|---|---|---|
excludeCountries | array | array of country codes to be excluded | ['cu','cw','kz'] |
onlyCountries | array | country codes to be included | ['cu','cw','kz'] |
preferredCountries | array | country codes to be at the top | ['cu','cw','kz'] |
defaultCountry | string | initial country | 'us' |
inputClass | string | class for input | |
dropdownClass | string | class for dropdown container | |
autoFormat | bool | on/off auto formatting, true by default | |
disableAreaCodes | bool | disable local codes for all countries | |
disableCountryCode | bool | false by default | |
disableDropdown | bool | false by default | |
enableLongNumbers | bool | false by default | |
countryCodeEditable | bool | true by default | |
Supported TextField props | |||
See TextField API for possible values https://material-ui.com/api/text-field/ |
Name | Type | Description |
---|---|---|
regions | array/string | to only show codes from selected regions |
Regions |
---|
['america', 'europe', 'asia', 'oceania', 'africa'] |
Subregions |
['north-america', 'south-america', 'central-america', 'carribean', 'european-union', 'ex-ussr', 'middle-east', 'north-africa'] |
Regions selected: {'europe'}
1<MuiPhoneInput 2 defaultCountry='it' 3 regions={'europe'} 4/>
Regions selected: {['north-america', 'carribean']}
1<MuiPhoneInput 2 defaultCountry='ca' 3 regions={['north-america', 'carribean']} 4/>
Name | Type |
---|---|
localization | object |
1<MuiPhoneInput 2 onlyCountries=['de', 'es'] 3 localization={{'Germany': 'Deutschland', 'Spain': 'España'}} 4/>
onChange | onFocus | onBlur | onClick | onKeyDown |
Country data object not returns from onKeyDown event
Data | Type | Description |
---|---|---|
value/event | string/object | the event or the phone number |
country data | object | the country object { name, dialCode, country code (iso2 format) } |
Based on react-phone-input-2
Based on react-phone-input using MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
Found 9/26 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
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
51 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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@types/material-ui-phone-number
TypeScript definitions for material-ui-phone-number
material-ui-phone-number-2
A material-ui react component to format phone numbers. Based on Material UI Phone Number, which ceased to be maintained.
mui-phone-input-ssr
An SSR-friendly Material UI React phone number input component. Based on the excellent material-ui-phone-number.
@mui/icons-material
Material Design icons distributed as SVG React components.