About
A flag-pill trigger that opens a searchable dialog for picking a country or region, with locale auto-detection.
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 } from "@/components/ui/country-select";
export default function CountrySelectDemo() {
const [region, setRegion] = React.useState<string | undefined>(undefined);
return (
<div className="flex min-h-[320px] w-full flex-col items-center justify-center gap-3 bg-background p-10 text-foreground">
<CountrySelect onValueChange={(code) => setRegion(code)} showName />
{region && (
<p className="text-sm text-muted-foreground">Selected: {region}</p>
)}
</div>
);
}








