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
| Prop | Type | Default | Description |
|---|---|---|---|
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. |