
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
react-phone-input-material-ui
Advanced tools
A material-ui react component to format phone numbers. Based on react-phone-input-2
Highly customizable phone input component with auto formatting. Based on the wonderful react-phone-input-2 package.
Supports material-ui v4 and v5.
npm install react-phone-input-material-ui --save
or
yarn add react-phone-input-material-ui
Mandatory props: value
and onChange
for controlling field; component
, ideally TextField
import React from 'react';
import ReactPhoneInput from 'react-phone-input-material-ui';
import { TextField, withStyles } from '@material-ui/core';
const styles = theme => ({
field: {
margin: '10px 0',
},
countryList: {
...theme.typography.body1,
},
});
function PhoneField(props) {
const { value, defaultCountry, onChange, classes } = props;
return (
<React.Fragment>
{/* Simple usage */}
<ReactPhoneInput
value={value}
onChange={onChange} // passed function receives the phone value
component={TextField}
/>
{/* Configure more */}
<ReactPhoneInput
value={value}
defaultCountry={defaultCountry || 'gb'}
onChange={onChange}
inputClass={classes.field}
dropdownClass={classes.countryList}
component={TextField}
/>
</React.Fragment>
);
}
export default withStyles(styles)(PhoneField);
Forked from react-phone-input-2. All the features of react-phone-input-2 are available. I will be update this library frequently to upto date with origin library
Code style changes not allowed
Based on react-phone-input
FAQs
A material-ui react component to format phone numbers. Based on react-phone-input-2
The npm package react-phone-input-material-ui receives a total of 4,660 weekly downloads. As such, react-phone-input-material-ui popularity was classified as popular.
We found that react-phone-input-material-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.