PhoneInput
A phone number field: the Input's box with a country segment at its start (the chosen country's flag and a caret, which open a list of countries with their names and dial codes) and that country's dial code inline before the number.
The number and the country are each controlled (value / country) or self-managed (defaultValue / defaultCountry), the segment defaults to the kit's curated PHONE_COUNTRIES list (pass countries for a full or localized one), and the number field asks for the phone keypad. Pass label (and required) to name it; error paints the whole box, segment included, and Field delegates its label, required mark and error into it. The required star is decorative: a screen reader hears the number field as required, from aria-required on the web and from its name ("Phone number, required") on iOS and Android. On iOS the field is drawn to the iOS input-field reference: the white box, the flag and gray caret segment with its state-coloured divider, the dial code in the placeholder gray.
In glass mode the country list is a dense-layer glass card under the box; the box, its segment and its number stay in place. A pick commits the country and returns focus to the number at once, and a field that becomes disabled or read-only while the list is open closes it. Solid mode paints the skin's own list.
Phone number
iOS
Phone number
Android
Phone number
Web
tsx
Default
Pre-filled
Another country
Error
Required
Controlled country
Custom country list
Disabled
Sizes
Props
PhoneEntry
PhoneInput
Do & Don’t
The country segment
Don’t
A plain Input makes the user type the prefix, and nothing tells the app which country the digits belong to.
Do
Phone number
Let the segment carry the country so the number stays national and the dial code is never typed twice.
Errors
Don’t
A loose red caption beside a neutral box reads as unfinished, and a screen reader never hears it with the field.
Do
Phone number
Invalid phone number.
Wrap the field in a Field so the message sits under the box and the box, segment included, paints the error border.