Mohammad Shehadeh

Country Select

Forms

About

Searchable country picker with flag emoji, pinned countries, optional dial codes, and single or multiple selection. Search by name or ISO code.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Country Select to your project and fits it to your theme.

Code

How Country Select is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import * as React from "react";
import {
  CountrySelect,
  CountrySelectTrigger,
  CountrySelectValue,
  CountrySelectContent,
  CountrySelectSearch,
  CountrySelectList,
} from "@/components/ui/country-select";

export default function CountrySelectDemo() {
  return (
    <div className="flex min-h-[420px] w-full items-center justify-center bg-background p-8 text-foreground">
      <div className="w-full max-w-xs">
        <CountrySelect priority={["US", "GB", "CA"]} defaultOpen>
          <CountrySelectTrigger>
            <CountrySelectValue />
          </CountrySelectTrigger>
          <CountrySelectContent>
            <CountrySelectSearch />
            <CountrySelectList />
          </CountrySelectContent>
        </CountrySelect>
      </div>
    </div>
  );
}

Dependencies

More by Mohammad Shehadeh

View all
  • Ecommerce Category Page

    Ecommerce Category Page

    117
  • Feature Problem Cards

    Feature Problem Cards

    106
  • Split Login

    Split Login

    103
  • Feature Grid Spotlight Cards

    Feature Grid Spotlight Cards

    101
  • Rounded Top Footer

    Rounded Top Footer

    93
  • Comparison Section

    Comparison Section

    86
  • FAQ Two Column

    FAQ Two Column

    85
  • Comparison Table

    Comparison Table

    82

More in Forms

View all
  • Premium Auth

    Premium Auth

    593
  • Contact Form

    Contact Form

    28
  • Form

    Form

    4
  • Login 1

    Login 1

    70
  • Book A Demo 1

    Book A Demo 1

    94
  • Contact Card

    Contact Card

    1.1K
  • HeroUI Field Error

    HeroUI Field Error

    13
  • Form [react-aria-components]

    Form [react-aria-components]

    19

Explore more

Part of Hirael — browse the full library on 21st.dev.