![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
react-tel-new-input
Advanced tools
React component for entering and validating international telephone numbers
IMP: From 3.*, the styles won't be included by default. Can use require('react-telephone-input/lib/withStyles')
to get the styles.
Inspired from the awesome jquery plugin for International Telephone Input.
This one is written as a reactjs component.
Live Demo here - http://unstack.in/react-telephone-input/
function handleInputChange(telNumber, selectedCountry) {
console.log('input changed. number: ', telNumber, 'selected country: ', selectedCountry);
}
// Use declaratively within another react components render method
var ReactTelInput = require('react-telephone-input');
// var ReactTelInput = require('react-telephone-input/lib/withStyles'), if you need the styles
<MyAwesomeReactComponent>
<ReactTelInput
defaultCountry="in"
flagsImagePath='/path/to/images/flags.png'
onChange={handleInputChange}
onBlur={handleInputBlur}
/>
</MyAwesomeReactComponent>
// or render standalone
var ReactTelInput = require('react-telephone-input');
React.render(<ReactTelInput
defaultCountry="in"
flagsImagePath='/path/to/images/flags.png'
onChange={handleInputChange}/>
onBlur={handleInputBlur}
document.getElementById('my-container'));
npm install
, you can just do var ReactTelephoneInput = require('react-telephone-input');
flagsImagePath
function handleInputChange(telNumber, selectedCountry) {
console.log('input changed. number: ', telNumber, 'selected country: ', selectedCountry);
}
function handleInputBlur(telNumber, selectedCountry) {
console.log('Focus off the ReactTelephoneInput component. Tel number entered is: ', telNumber, ' selected country is: ', selectedCountry);
}
<ReactTelephoneInput
defaultCountry='in'
flagsImagePath='/path/to/images/flags.png'
onChange={handleInputChange}
onBlur={handleInputBlur}
/>
The default value for flagsImagePath
is 'flags.png'
You can try the app by downloading everything and running the commands given below -
$ npm install
$ npm start
go to your browser and type `http://localhost:8000`
FAQs
React component for entering and validating international telephone numbers
The npm package react-tel-new-input receives a total of 5 weekly downloads. As such, react-tel-new-input popularity was classified as not popular.
We found that react-tel-new-input 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.