Pickers
Country and language pickers as dropdown compositions, not separate components.
Country
A pattern, not a component: DropdownMenu with DropdownMenuSearch and radio items. Show the flag beside the name, never on its own.
Language
Show each language's own name as trailing text, and match the search against both names.
Phone number
Put the country code picker inside the phone field's leading addon. Phone pickers use the 24×16 flag.
Best practices
When to use
- Use for compact, constrained choices such as country, language, or phone country code.
- Use a general Combobox when the collection needs broad search, grouping, or custom option rendering.
Behavior
- Build pickers from DropdownMenu with DropdownMenuSearch and a DropdownMenuRadioGroup, so the current choice shows a check. Reset the query when the menu closes.
- Match search against every name people might type, such as “German” and “Deutsch”.
- Put a phone country code picker in the leading addon of the phone field, using the 24×16 flag.
Content
- Show the flag beside the country name, never on its own. Show each language in its own name as trailing text.
Accessibility
- Give the phone code trigger an aria-label that includes the country, like “Country code, India”, and set lang on native-language names.