PhoneInputControlProps
type PhoneInputControlProps = { country: CountryCode; errorMessage?: string; onBlur: (e: FocusEvent<HTMLInputElement>) => void; onChange: (e: ChangeEvent<HTMLInputElement>) => void; onCountryChange: (country: CountryCode) => void; unknownPrefix: boolean; value: string;};Props produced by usePhoneInput().inputProps and spread onto <PhoneInput>.
PhoneInput is presentational — it is always driven by these.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
country |
CountryCode |
Currently selected country. |
errorMessage? |
string |
Localized message for the current invalid state, rendered in the error message slot. |
onBlur |
(e: FocusEvent<HTMLInputElement>) => void |
- |
onChange |
(e: ChangeEvent<HTMLInputElement>) => void |
- |
onCountryChange |
(country: CountryCode) => void |
- |
unknownPrefix |
boolean |
Whether the typed “+” prefix matches no known calling code (show the generic icon). |
value |
string |
Current display value (the user’s spacing preserved while typing). |