
Description
react-telephone-input is a React component for entering and validating international telephone numbers. It is inspired by the jQuery International Telephone Input plugin, and it is written as a React component. The component shows a country dropdown with a telephone input next to it. Its props let you set the value and initialValue for the starting number, turn auto formatting on or off (it is on by default), and choose a default country by its ISO2 code, such as us for the United States. You can limit the dropdown to a list of countries with onlyCountries, and show preferred countries at the top of the list with preferredCountries, which takes ISO2 names. The classNames prop adds classes to the top container. Event props include onChange, which runs when the value changes, and onEnterKeyPress, which runs when the user presses Enter.…
Highlights
- International phone number input
- Country dropdown with preferred countries
- Auto formatting on by default
- Change and Enter key callbacks
Ratings & Reviews
No ratings yet
Be the first to rate react-telephone-input.
People also visit
react-telephone-input FAQ
What is react-telephone-input?
A React component for entering and validating international telephone numbers, with a country dropdown.
How do I set the default country?
Pass the ISO2 code of the country to the defaultCountry prop, such as us for the United States.
Can I limit the list of countries?
Yes. Pass an array of country objects to onlyCountries. preferredCountries shows chosen countries at the top.
Is styling included?
From version 3, styles are not included by default. From version 5, import the CSS file directly, as the README explains.
Can I turn off formatting?
Yes. autoFormat is true by default. Setting it to false turns off all auto formatting.
What are the best react-telephone-input alternatives?
Popular alternatives to react-telephone-input include react-international-phone, react-native-phone-number-input and react-number-format. See all react-telephone-input alternatives



















