> ## Documentation Index
> Fetch the complete documentation index at: https://api.fanvue.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CountryFlag

> A circular country flag for any of 265 codes, drawn inline as SVG.

```tsx theme={null}
import { CountryFlag } from "@fanvue/ui/flags";

<CountryFlag country="NL" size={24} label="Netherlands" />;
```

<Note>
  Flags live on their own subpath so the artwork for 265 countries never lands
  in a bundle that does not ask for it — see [Subpath exports](/docs/ui/subpath-exports).
</Note>

## Props

## CountryFlag

A country's flag, drawn as a circle. Use it wherever a row is keyed by country — a demographics breakdown, a country picker, the country selector on `PhoneField`.

Prefer this to a flag emoji: emoji flags fall back to bare letter pairs on Windows, where the fonts carry no flag glyphs.

<ParamField path="country" type="string" required>
  Two-letter country code, case-insensitive (e.g. `"US"`, `"nl"`). Codes we hold no artwork for render a grey placeholder disc, so a live feed of country codes can be passed straight through.
</ParamField>

<ParamField path="label" type="string">
  Accessible name, e.g. the country's translated name. Leave unset when the flag sits next to that name anyway — it is then hidden from assistive tech rather than read out twice.
</ParamField>

<ParamField path="size" type="16 | 24 | 32 | 20" default="20">
  Rendered edge length in px. Defaults to 20, the size the designs use.
</ParamField>

## Exported types

Also exported from `@fanvue/ui/flags`: `CountryFlagCode`, `CountryFlagProps`, `CountryFlagSize`.

## Examples

## Default

<Frame>
  <iframe src={"https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-countryflag--default&viewMode=story&shortcuts=false&singleStory=true&globals=theme:light"} width="100%" height="240" style={{border: "none", borderRadius: "8px"}} loading="lazy" title="CountryFlag — Default" />
</Frame>

```tsx theme={null}
import { CountryFlag } from "@fanvue/ui/flags";

<CountryFlag country="US" label="United States" />
```

## Unknown country code

<Frame>
  <iframe src={"https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-countryflag--unknown&viewMode=story&shortcuts=false&singleStory=true&globals=theme:light"} width="100%" height="240" style={{border: "none", borderRadius: "8px"}} loading="lazy" title="CountryFlag — Unknown country code" />
</Frame>

```tsx theme={null}
import { CountryFlag } from "@fanvue/ui/flags";

<div className="flex items-center gap-4">
  <CountryFlag country="NL" label="Netherlands" />
  <CountryFlag country="zz" label="Unknown" />
  <span className="typography-body-small-14px-regular text-content-secondary">
    A real flag beside a code we hold no artwork for. The placeholder keeps the row aligned
    instead of leaving a gap.
  </span>
</div>
```

## Sizes

<Frame>
  <iframe src={"https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-countryflag--sizes&viewMode=story&shortcuts=false&singleStory=true&globals=theme:light"} width="100%" height="240" style={{border: "none", borderRadius: "8px"}} loading="lazy" title="CountryFlag — Sizes" />
</Frame>

```tsx theme={null}
import { CountryFlag } from "@fanvue/ui/flags";
import type { CountryFlagSize } from "@fanvue/ui/flags";

const SIZES: CountryFlagSize[] = [16, 20, 24, 32];

<div className="flex items-end gap-4">
  {SIZES.map((size) => (
    <span key={size} className="flex flex-col items-center gap-2">
      <CountryFlag country="US" size={size} />
      <span className="typography-description-12px-regular text-content-secondary">{size}</span>
    </span>
  ))}
</div>
```

## Every flag

<Frame>
  <iframe src={"https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-countryflag--all-flags&viewMode=story&shortcuts=false&singleStory=true&globals=theme:light"} width="100%" height="420" style={{border: "none", borderRadius: "8px"}} loading="lazy" title="Every country flag" />
</Frame>

## Supported codes

Codes are case-insensitive, mostly ISO 3166-1 alpha-2 plus the extras the
artwork source ships (`eu`, `un`, `xk`). Anything with no artwork renders the
grey placeholder disc, so a live feed of country codes can be passed straight
through without filtering.

| Code | Country                                |
| ---- | -------------------------------------- |
| `ac` | Ascension Island                       |
| `ad` | Andorra                                |
| `ae` | United Arab Emirates                   |
| `af` | Afghanistan                            |
| `ag` | Antigua & Barbuda                      |
| `ai` | Anguilla                               |
| `al` | Albania                                |
| `am` | Armenia                                |
| `an` | Curaçao                                |
| `ao` | Angola                                 |
| `aq` | Antarctica                             |
| `ar` | Argentina                              |
| `as` | American Samoa                         |
| `at` | Austria                                |
| `au` | Australia                              |
| `aw` | Aruba                                  |
| `ax` | Åland Islands                          |
| `az` | Azerbaijan                             |
| `ba` | Bosnia & Herzegovina                   |
| `bb` | Barbados                               |
| `bd` | Bangladesh                             |
| `be` | Belgium                                |
| `bf` | Burkina Faso                           |
| `bg` | Bulgaria                               |
| `bh` | Bahrain                                |
| `bi` | Burundi                                |
| `bj` | Benin                                  |
| `bl` | St. Barthélemy                         |
| `bm` | Bermuda                                |
| `bn` | Brunei                                 |
| `bo` | Bolivia                                |
| `bq` | Caribbean Netherlands                  |
| `br` | Brazil                                 |
| `bs` | Bahamas                                |
| `bt` | Bhutan                                 |
| `bv` | Bouvet Island                          |
| `bw` | Botswana                               |
| `by` | Belarus                                |
| `bz` | Belize                                 |
| `ca` | Canada                                 |
| `cc` | Cocos (Keeling) Islands                |
| `cd` | Congo - Kinshasa                       |
| `cf` | Central African Republic               |
| `cg` | Congo - Brazzaville                    |
| `ch` | Switzerland                            |
| `ci` | Côte d’Ivoire                          |
| `ck` | Cook Islands                           |
| `cl` | Chile                                  |
| `cm` | Cameroon                               |
| `cn` | China                                  |
| `co` | Colombia                               |
| `cp` | Clipperton Island                      |
| `cq` | Sark                                   |
| `cr` | Costa Rica                             |
| `cu` | Cuba                                   |
| `cv` | Cape Verde                             |
| `cw` | Curaçao                                |
| `cx` | Christmas Island                       |
| `cy` | Cyprus                                 |
| `cz` | Czechia                                |
| `de` | Germany                                |
| `dg` | Diego Garcia                           |
| `dj` | Djibouti                               |
| `dk` | Denmark                                |
| `dm` | Dominica                               |
| `do` | Dominican Republic                     |
| `dz` | Algeria                                |
| `ea` | Ceuta & Melilla                        |
| `ec` | Ecuador                                |
| `ee` | Estonia                                |
| `eg` | Egypt                                  |
| `eh` | Western Sahara                         |
| `er` | Eritrea                                |
| `es` | Spain                                  |
| `et` | Ethiopia                               |
| `eu` | European Union                         |
| `fi` | Finland                                |
| `fj` | Fiji                                   |
| `fk` | Falkland Islands                       |
| `fm` | Micronesia                             |
| `fo` | Faroe Islands                          |
| `fr` | France                                 |
| `fx` | France                                 |
| `ga` | Gabon                                  |
| `gb` | United Kingdom                         |
| `gd` | Grenada                                |
| `ge` | Georgia                                |
| `gf` | French Guiana                          |
| `gg` | Guernsey                               |
| `gh` | Ghana                                  |
| `gi` | Gibraltar                              |
| `gl` | Greenland                              |
| `gm` | Gambia                                 |
| `gn` | Guinea                                 |
| `gp` | Guadeloupe                             |
| `gq` | Equatorial Guinea                      |
| `gr` | Greece                                 |
| `gs` | South Georgia & South Sandwich Islands |
| `gt` | Guatemala                              |
| `gu` | Guam                                   |
| `gw` | Guinea-Bissau                          |
| `gy` | Guyana                                 |
| `hk` | Hong Kong SAR China                    |
| `hm` | Heard & McDonald Islands               |
| `hn` | Honduras                               |
| `hr` | Croatia                                |
| `ht` | Haiti                                  |
| `hu` | Hungary                                |
| `ic` | Canary Islands                         |
| `id` | Indonesia                              |
| `ie` | Ireland                                |
| `il` | Israel                                 |
| `im` | Isle of Man                            |
| `in` | India                                  |
| `io` | British Indian Ocean Territory         |
| `iq` | Iraq                                   |
| `ir` | Iran                                   |
| `is` | Iceland                                |
| `it` | Italy                                  |
| `je` | Jersey                                 |
| `jm` | Jamaica                                |
| `jo` | Jordan                                 |
| `jp` | Japan                                  |
| `ke` | Kenya                                  |
| `kg` | Kyrgyzstan                             |
| `kh` | Cambodia                               |
| `ki` | Kiribati                               |
| `km` | Comoros                                |
| `kn` | St. Kitts & Nevis                      |
| `kp` | North Korea                            |
| `kr` | South Korea                            |
| `kw` | Kuwait                                 |
| `ky` | Cayman Islands                         |
| `kz` | Kazakhstan                             |
| `la` | Laos                                   |
| `lb` | Lebanon                                |
| `lc` | St. Lucia                              |
| `li` | Liechtenstein                          |
| `lk` | Sri Lanka                              |
| `lr` | Liberia                                |
| `ls` | Lesotho                                |
| `lt` | Lithuania                              |
| `lu` | Luxembourg                             |
| `lv` | Latvia                                 |
| `ly` | Libya                                  |
| `ma` | Morocco                                |
| `mc` | Monaco                                 |
| `md` | Moldova                                |
| `me` | Montenegro                             |
| `mf` | St. Martin                             |
| `mg` | Madagascar                             |
| `mh` | Marshall Islands                       |
| `mk` | North Macedonia                        |
| `ml` | Mali                                   |
| `mm` | Myanmar (Burma)                        |
| `mn` | Mongolia                               |
| `mo` | Macao SAR China                        |
| `mp` | Northern Mariana Islands               |
| `mq` | Martinique                             |
| `mr` | Mauritania                             |
| `ms` | Montserrat                             |
| `mt` | Malta                                  |
| `mu` | Mauritius                              |
| `mv` | Maldives                               |
| `mw` | Malawi                                 |
| `mx` | Mexico                                 |
| `my` | Malaysia                               |
| `mz` | Mozambique                             |
| `na` | Namibia                                |
| `nc` | New Caledonia                          |
| `ne` | Niger                                  |
| `nf` | Norfolk Island                         |
| `ng` | Nigeria                                |
| `ni` | Nicaragua                              |
| `nl` | Netherlands                            |
| `no` | Norway                                 |
| `np` | Nepal                                  |
| `nr` | Nauru                                  |
| `nu` | Niue                                   |
| `nz` | New Zealand                            |
| `om` | Oman                                   |
| `pa` | Panama                                 |
| `pe` | Peru                                   |
| `pf` | French Polynesia                       |
| `pg` | Papua New Guinea                       |
| `ph` | Philippines                            |
| `pk` | Pakistan                               |
| `pl` | Poland                                 |
| `pm` | St. Pierre & Miquelon                  |
| `pn` | Pitcairn Islands                       |
| `pr` | Puerto Rico                            |
| `ps` | Palestinian Territories                |
| `pt` | Portugal                               |
| `pw` | Palau                                  |
| `py` | Paraguay                               |
| `qa` | Qatar                                  |
| `re` | Réunion                                |
| `ro` | Romania                                |
| `rs` | Serbia                                 |
| `ru` | Russia                                 |
| `rw` | Rwanda                                 |
| `sa` | Saudi Arabia                           |
| `sb` | Solomon Islands                        |
| `sc` | Seychelles                             |
| `sd` | Sudan                                  |
| `se` | Sweden                                 |
| `sg` | Singapore                              |
| `sh` | St. Helena                             |
| `si` | Slovenia                               |
| `sj` | Svalbard & Jan Mayen                   |
| `sk` | Slovakia                               |
| `sl` | Sierra Leone                           |
| `sm` | San Marino                             |
| `sn` | Senegal                                |
| `so` | Somalia                                |
| `sr` | Suriname                               |
| `ss` | South Sudan                            |
| `st` | São Tomé & Príncipe                    |
| `su` | Russia                                 |
| `sv` | El Salvador                            |
| `sx` | Sint Maarten                           |
| `sy` | Syria                                  |
| `sz` | Eswatini                               |
| `ta` | Tristan da Cunha                       |
| `tc` | Turks & Caicos Islands                 |
| `td` | Chad                                   |
| `tf` | French Southern Territories            |
| `tg` | Togo                                   |
| `th` | Thailand                               |
| `tj` | Tajikistan                             |
| `tk` | Tokelau                                |
| `tl` | Timor-Leste                            |
| `tm` | Turkmenistan                           |
| `tn` | Tunisia                                |
| `to` | Tonga                                  |
| `tr` | Türkiye                                |
| `tt` | Trinidad & Tobago                      |
| `tv` | Tuvalu                                 |
| `tw` | Taiwan                                 |
| `tz` | Tanzania                               |
| `ua` | Ukraine                                |
| `ug` | Uganda                                 |
| `uk` | United Kingdom                         |
| `um` | U.S. Outlying Islands                  |
| `un` | United Nations                         |
| `us` | United States                          |
| `uy` | Uruguay                                |
| `uz` | Uzbekistan                             |
| `va` | Vatican City                           |
| `vc` | St. Vincent & Grenadines               |
| `ve` | Venezuela                              |
| `vg` | British Virgin Islands                 |
| `vi` | U.S. Virgin Islands                    |
| `vn` | Vietnam                                |
| `vu` | Vanuatu                                |
| `wf` | Wallis & Futuna                        |
| `ws` | Samoa                                  |
| `xk` | Kosovo                                 |
| `xx` | Unknown / placeholder                  |
| `ye` | Yemen                                  |
| `yt` | Mayotte                                |
| `yu` | Serbia                                 |
| `za` | South Africa                           |
| `zm` | Zambia                                 |
| `zw` | Zimbabwe                               |

***

**Setup:** [Installation](/docs/ui/installation) · [Theming](/docs/ui/theming) · [Subpath exports](/docs/ui/subpath-exports)
