1.2.1 • Published 7 years ago
react-phone-input v1.2.1
react-phone-input
A simple react component to format a phone number as the user types.
Installation:
npm install react-phone-input --save
Usage:
React.render(
<ReactPhoneInput defaultCountry={'us'} onChange{handleOnChange)/>,
document.getElementById('content'));
Your handler for the onChange
event should expect a string as
parameter, where the value is that of the entered phone number. For example:
function handeOnChange(value) {
this.setState({
phone: value
});
}
Options:
Name | Description |
---|---|
defaultCountry | country code to initialize the component |
excludeCountries | array of country codes to be excluded e.g. 'cu','cw','kz' |
onlyCountries | array of country codes to be included e.g. 'cu','cw','kz' |
preferredCountries | array of country codes to be preferred (highlighted at the top) e.g. 'cu','cw','kz' |
License
1.2.1
7 years ago
1.2.0
7 years ago
1.1.3
8 years ago
1.1.2
8 years ago
1.1.1
8 years ago
1.1.0
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago
0.10.7
8 years ago
0.10.6
9 years ago
0.10.5
9 years ago
0.10.4
9 years ago
0.10.3
9 years ago
0.10.2
9 years ago
0.10.1
9 years ago
0.10.0
9 years ago
0.9.1
9 years ago
0.1.9
9 years ago
0.1.8
9 years ago
0.1.7
9 years ago
0.1.6
9 years ago
0.1.5
9 years ago
0.1.4
9 years ago
0.1.3
9 years ago
0.1.2
9 years ago
0.1.1
9 years ago
0.1.0
9 years ago