react-world-flags
react-world-flags copied to clipboard
exclude country from list ?
can we exclude country from list ?
or have a list, of what are supported countries to show in list dropdown ?
Try the latest beta npm install [email protected] - it exposes a list of all flags. You can use it like this:
import Flag, { countries } from "react-world-flags";
And then something like
{countries.map((country) => (
<div key={country.alpha2} className="flex items-center gap-2">
<Flag code={country.alpha2} className="w-4 h-4" />
{country.name}
</div>
))}