You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 027653b
Browse filesBrowse the repository at this point in the historyBrowse files
Document the menu as the union of countries and preferredCountries, add preferredDivider to the classNames list, correct remaining 50-country copy to ~244, uppercase-normalize the preferred-code dedup, reject a non-leading plus sign, and assert the exact E.164 table size.
|`value`|`string`| No | Phone number — pass this to control the component |
198
-
|`defaultValue`|`string`| No | Initial phone number when uncontrolled |
199
-
|`onValueChange`|`(phone: string, country: Country) => void`| No | Callback when phone number or country changes |
200
-
|`country`|`string`| No | Selected country code (ISO 3166-1 alpha-2) — pass this to control the country |
201
-
|`onCountryChange`|`(country: Country) => void`| No | Callback when the selected country changes — from the menu or dial-code detection |
202
-
|`validate`|`boolean`| No | Mark the input `aria-invalid` when a non-empty number is malformed (default: `false`) |
203
-
|`onValidityChange`|`(valid: boolean, e164: string) => void`| No | Callback with basic E.164 validity and the normalized number, whenever the digits change |
204
-
|`defaultCountry`|`string`| No | Initial country code when uncontrolled (ISO 3166-1 alpha-2, e.g. `"US"`, `"GB"`, `"IN"`; default: `"US"`) |
205
-
|`countries`|`(Country \| string)[]`| No | Countries offered, in display order; entries are `Country` objects or ISO codes (default: `COUNTRIES`) |
206
-
|`preferredCountries`|`(Country \| string)[]`| No | Countries pinned above a divider at the top; added even when not in `countries`, and deduplicated |
207
-
|`placeholder`|`string`| No | Placeholder text |
208
-
|`disabled`|`boolean`| No | Disable the input |
209
-
|`showFlags`|`boolean`| No | Show country flag next to dial code (default: `true`) |
210
-
|`size`|`"sm" \| "default" \| "lg"`| No | Field height (default: `"default"`) |
211
-
|`align`|`"start" \| "end"`| No | Edge of the field the menu lines up with (default: `"start"`) |
212
-
|`side`|`"top" \| "bottom"`| No | Preferred menu side; flips when there is no room (default: `"bottom"`) |
213
-
|`searchPlaceholder`|`string`| No | Placeholder for the country search (default: `"Search countries..."`) |
214
-
|`emptyMessage`|`ReactNode`| No | Shown when the search matches nothing (default: `"No countries found."`) |
215
-
|`labels`|`Partial<PhoneInputLabels>`| No | Override the built-in English UI text (see below) |
216
-
|`displayLocale`|`string`| No | Locale for country names, e.g. `"fr"` (default: English names) |
217
-
|`maxHeight`|`number \| string`| No | Max height of the scrolling country list (default: `"15rem"`) |
218
-
|`label`|`string`| No | Accessible label for the input |
219
-
|`className`|`string`| No | Classes for the root wrapper |
|`value`|`string`| No | Phone number — pass this to control the component |
201
+
|`defaultValue`|`string`| No | Initial phone number when uncontrolled |
202
+
|`onValueChange`|`(phone: string, country: Country) => void`| No | Callback when phone number or country changes |
203
+
|`country`|`string`| No | Selected country code (ISO 3166-1 alpha-2) — pass this to control the country |
204
+
|`onCountryChange`|`(country: Country) => void`| No | Callback when the selected country changes — from the menu or dial-code detection |
205
+
|`validate`|`boolean`| No | Mark the input `aria-invalid` when a non-empty number is malformed (default: `false`) |
206
+
|`onValidityChange`|`(valid: boolean, e164: string) => void`| No | Callback with basic E.164 validity and the normalized number, whenever the digits change |
207
+
|`defaultCountry`|`string`| No | Initial country code when uncontrolled (ISO 3166-1 alpha-2, e.g. `"US"`, `"GB"`, `"IN"`; default: `"US"`) |
208
+
|`countries`|`(Country \| string)[]`| No | Countries offered, in display order; entries are `Country` objects or ISO codes (default: `COUNTRIES`) |
209
+
|`preferredCountries`|`(Country \| string)[]`| No | Countries pinned above a divider at the top; added even when not in `countries`, and deduplicated |
210
+
|`placeholder`|`string`| No | Placeholder text |
211
+
|`disabled`|`boolean`| No | Disable the input |
212
+
|`showFlags`|`boolean`| No | Show country flag next to dial code (default: `true`) |
213
+
|`size`|`"sm" \| "default" \| "lg"`| No | Field height (default: `"default"`) |
214
+
|`align`|`"start" \| "end"`| No | Edge of the field the menu lines up with (default: `"start"`) |
215
+
|`side`|`"top" \| "bottom"`| No | Preferred menu side; flips when there is no room (default: `"bottom"`) |
216
+
|`searchPlaceholder`|`string`| No | Placeholder for the country search (default: `"Search countries..."`) |
217
+
|`emptyMessage`|`ReactNode`| No | Shown when the search matches nothing (default: `"No countries found."`) |
218
+
|`labels`|`Partial<PhoneInputLabels>`| No | Override the built-in English UI text (see below) |
219
+
|`displayLocale`|`string`| No | Locale for country names, e.g. `"fr"` (default: English names) |
220
+
|`maxHeight`|`number \| string`| No | Max height of the scrolling country list (default: `"15rem"`) |
221
+
|`label`|`string`| No | Accessible label for the input |
222
+
|`className`|`string`| No | Classes for the root wrapper |
0 commit comments