Phone Input

A phone field paired with a searchable country selector. Ships with 195+ countries (flag emoji + dial code) and strips invalid characters as the user types.

Installation

Props

PropTypeDefaultDescription
defaultCountry
string"US"ISO 3166-1 alpha-2 country code shown in the country selector.
value
stringβ€”Controlled phone value (digits, hyphens, parens).
onChange
(value, country) => voidβ€”Called when the phone or country changes.
onCountryChange
(country) => voidβ€”Called when only the country changes.
countries
Country[]β€”Override the default 195+ country list.