Country Selector

pro

Searchable country dropdown with emoji flags.

Overview

The Country Selector provides a searchable dropdown of countries with optional emoji flags. Includes 54 countries with full keyboard navigation, auto-direction detection, and a sticky search input.

Properties

PropertyTypeDefaultDescription
nameString"country"Field name used in form data.
labelString"Country"Label displayed above the dropdown.
placeholderString"Select a country"Placeholder text.
defaultCountryString"United States"Pre-selected country (must match exact name).
allowSearchBooleantrueEnable/disable search filtering.
showFlagsBooleantrueShow emoji flags next to country names.
requiredBooleanfalseWhether a country must be selected.

Features

  • 54 countries with emoji flags
  • Searchable dropdown with sticky search input
  • Full keyboard navigation (arrows, Enter, Escape)
  • Auto-direction detection (opens up or down)
  • Custom trigger, dropdown, search, and option styling
  • Hidden <input> for native form submission

Tips

The defaultCountry value must match the country name exactly (e.g., "United States", not "US" or "USA").
Disable showFlags if emoji rendering is inconsistent across your users' platforms.

Related components