flags.mdx 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. ---
  2. title: Flags
  3. summary: Thanks to the Tabler flags plugin, you can create flags to visually represent countries or languages. Flags are often used in forms, as an element of a delivery address, phone number dialling code and many more.
  4. plugin: flags
  5. libs: tabler-flags
  6. description: Visual representation of countries/languages.
  7. ---
  8. ## Installation
  9. This part of Tabler is distributed as plugin. To enable it you should include `tabler-flags.css` or `tabler-flags.min.css` file to your page.
  10. You can also include plugin via CDN:
  11. ```html
  12. <link rel="stylesheet" href="$TABLER_CDN/dist/css/tabler-flags.min.css">
  13. ```
  14. ## Flag
  15. To create a flag, add the `flag` class to a component and choose the country whose flag you want to use.
  16. ```html example centered separated plugins="flags"
  17. <span class="flag flag-country-us"></span>
  18. ```
  19. ## Country flags
  20. To use the flag of a particular country, add the `flag-country-(country name)` class. For example, to create a flag of Andorra should use the following class: `.flag-country-ad`. Full list of countries can be found below.
  21. ```html
  22. <span class="flag flag-country-ad"></span>
  23. <span class="flag flag-country-ae"></span>
  24. ```
  25. ```html example centered separated plugins="flags"
  26. <span class="flag flag-country-tg"></span>
  27. <span class="flag flag-country-br"></span>
  28. <span class="flag flag-country-pt"></span>
  29. ```
  30. ## Flag sizes
  31. Using Bootstrap’s typical naming structure, you can create a standard flag, or scale it up or down to different sizes based on what’s needed.
  32. ```html example centered separated plugins="flags"
  33. <span class="flag flag-xl flag-country-us"></span>
  34. <span class="flag flag-lg flag-country-us"></span>
  35. <span class="flag flag-md flag-country-us"></span>
  36. <span class="flag flag-sm flag-country-us"></span>
  37. <span class="flag flag-xs flag-country-us"></span>
  38. ```
  39. ```html
  40. <span class="flag flag-xl ..."></span>
  41. <span class="flag flag-lg ..."></span>
  42. <span class="flag flag-md ..."></span>
  43. <span class="flag flag-sm ..."></span>
  44. <span class="flag flag-xs ..."></span>
  45. ```
  46. ## Flags list
  47. The full list of countries can be found below.
  48. <FlagsTable countries={[
  49. { "name": "Andorra", "code": "ad" },
  50. { "name": "United Arab Emirates", "code": "ae" },
  51. { "name": "Afghanistan", "code": "af" },
  52. { "name": "Antigua", "code": "ag" },
  53. { "name": "Anguilla", "code": "ai" },
  54. { "name": "Armenia", "code": "am" },
  55. { "name": "Angolan", "code": "ao" },
  56. { "name": "Antarctica", "code": "aq" },
  57. { "name": "Argentina", "code": "ar" },
  58. { "name": "American Samoa", "code": "as" },
  59. { "name": "Austria", "code": "at" },
  60. { "name": "Australia", "code": "au" },
  61. { "name": "Aruba", "code": "aw" },
  62. { "name": "Aslan Islands", "code": "ax" },
  63. { "name": "Azerbaijan", "code": "az" },
  64. { "name": "Bosnian", "code": "ba" },
  65. { "name": "Barbados", "code": "bb" },
  66. { "name": "Belgium", "code": "be" },
  67. { "name": "Burkina Faso", "code": "bf" },
  68. { "name": "Bulgaria", "code": "bg" },
  69. { "name": "Bahrain", "code": "bh" },
  70. { "name": "Burundi", "code": "bi" },
  71. { "name": "Benin", "code": "bj" },
  72. { "name": "Saint-Barthélemy", "code": "bl" },
  73. { "name": "Bermuda", "code": "bm" },
  74. { "name": "Bruneian", "code": "bn" },
  75. { "name": "Bolivia", "code": "bo" },
  76. { "name": "Bonaire", "code": "bq-bo" },
  77. { "name": "Brazil", "code": "br" },
  78. { "name": "Bahamas", "code": "bs" },
  79. { "name": "Bhutan", "code": "bt" },
  80. { "name": "Bouvet Island", "code": "bv" },
  81. { "name": "Batswana", "code": "bw" },
  82. { "name": "Belarus", "code": "by" },
  83. { "name": "Belize", "code": "bz" },
  84. { "name": "Canada", "code": "ca" },
  85. { "name": "Cocos Island", "code": "cc" },
  86. { "name": "Democratic Republic of Congo", "code": "cd" },
  87. { "name": "Central African Republic", "code": "cf" },
  88. { "name": "Republic of the Congo", "code": "cg" },
  89. { "name": "Switzerland", "code": "ch" },
  90. { "name": "Ivory Coast", "code": "ci" },
  91. { "name": "Cook Island", "code": "ck" },
  92. { "name": "Chile", "code": "cl" },
  93. { "name": "Cameroon", "code": "cm" },
  94. { "name": "China", "code": "cn" },
  95. { "name": "Colombia", "code": "co" },
  96. { "name": "Costa Rica", "code": "cr" },
  97. { "name": "Cuba", "code": "cu" },
  98. { "name": "Cape Verde", "code": "cv" },
  99. { "name": "Curacao", "code": "cw" },
  100. { "name": "Christmas Island", "code": "cx" },
  101. { "name": "Cyprus", "code": "cy" },
  102. { "name": "Czech Republic", "code": "cz" },
  103. { "name": "Germany", "code": "de" },
  104. { "name": "Djibouti", "code": "dj" },
  105. { "name": "Denmark", "code": "dk" },
  106. { "name": "Dominica", "code": "dm" },
  107. { "name": "Dominican Republic", "code": "do" },
  108. { "name": "Algeria", "code": "dz" },
  109. { "name": "Ecuador", "code": "ec" },
  110. { "name": "Estonia", "code": "ee" },
  111. { "name": "Egypt", "code": "eg" },
  112. { "name": "Sahrawi", "code": "eh" },
  113. { "name": "Eritrea", "code": "er" },
  114. { "name": "Spain", "code": "es" },
  115. { "name": "Ethiopia", "code": "et" },
  116. { "name": "European Union", "code": "eu" },
  117. { "name": "Finland", "code": "fi" },
  118. { "name": "Fiji", "code": "fj" },
  119. { "name": "Falkland Islands", "code": "fk" },
  120. { "name": "Federate States of Micronesia", "code": "fm" },
  121. { "name": "Faroe Islands", "code": "fo" },
  122. { "name": "France", "code": "fr" },
  123. { "name": "Gabon", "code": "ga" },
  124. { "name": "Great Britain", "code": "gb" },
  125. { "name": "England", "code": "gb-eng" },
  126. { "name": "Northern Ireland", "code": "gb-nir" },
  127. { "name": "Scotland", "code": "gb-sct" },
  128. { "name": "Wales", "code": "gb-wls" },
  129. { "name": "Grenada", "code": "gd" },
  130. { "name": "Georgia", "code": "ge" },
  131. { "name": "Guyana", "code": "gf" },
  132. { "name": "Guernsey", "code": "gg" },
  133. { "name": "Ghana", "code": "gh" },
  134. { "name": "Gibraltar", "code": "gi" },
  135. { "name": "Greenland", "code": "gl" },
  136. { "name": "Gambia", "code": "gm" },
  137. { "name": "Guinea", "code": "gn" },
  138. { "name": "Guadeloupe", "code": "gp" },
  139. { "name": "Equatorial Guinea", "code": "gq" },
  140. { "name": "Greece", "code": "gr" },
  141. { "name": "South Georgia", "code": "gs" },
  142. { "name": "Guatemala", "code": "gt" },
  143. { "name": "Guam", "code": "gu" },
  144. { "name": "Guinea-Bissau", "code": "gw" },
  145. { "name": "Guyana", "code": "gy" },
  146. { "name": "Hong Kong", "code": "hk" },
  147. { "name": "Heard and McDonald Islands", "code": "hm" },
  148. { "name": "Honduras", "code": "hn" },
  149. { "name": "Croatia", "code": "hr" },
  150. { "name": "Haiti", "code": "ht" },
  151. { "name": "Hungary", "code": "hu" },
  152. { "name": "Indonesia", "code": "id" },
  153. { "name": "Ireland", "code": "ie" },
  154. { "name": "Israel", "code": "il" },
  155. { "name": "Isle of Man", "code": "im" },
  156. { "name": "India", "code": "in" },
  157. { "name": "British Indian Ocean Territory", "code": "io" },
  158. { "name": "Iraq", "code": "iq" },
  159. { "name": "Iran", "code": "ir" },
  160. { "name": "Iceland", "code": "is" },
  161. { "name": "Italy", "code": "it" },
  162. { "name": "Jersey", "code": "je" },
  163. { "name": "Jamaica", "code": "jm" },
  164. { "name": "Jordan", "code": "jo" },
  165. { "name": "Japan", "code": "jp" },
  166. { "name": "Kenya", "code": "ke" },
  167. { "name": "Kyrgyzstan", "code": "kg" },
  168. { "name": "Cambodia", "code": "kh" },
  169. { "name": "Kiribati", "code": "ki" },
  170. { "name": "Comoros", "code": "km" },
  171. { "name": "Saint Kitts and Nevis", "code": "kn" },
  172. { "name": "North Korea", "code": "kp" },
  173. { "name": "South Korea", "code": "kr" },
  174. { "name": "Kuwait", "code": "kw" },
  175. { "name": "Cayman Islands", "code": "ky" },
  176. { "name": "Kazakhstan", "code": "kz" },
  177. { "name": "Laos", "code": "la" },
  178. { "name": "Lebanese", "code": "lb" },
  179. { "name": "Saint Lucia", "code": "lc" },
  180. { "name": "Liechtenstein", "code": "li" },
  181. { "name": "Sri Lanka", "code": "lk" },
  182. { "name": "Liberia", "code": "lr" },
  183. { "name": "Lesotho", "code": "ls" },
  184. { "name": "Lithuania", "code": "lt" },
  185. { "name": "Luxembourg", "code": "lu" },
  186. { "name": "Latvia", "code": "lv" },
  187. { "name": "Libya", "code": "ly" },
  188. { "name": "Morocco", "code": "ma" },
  189. { "name": "Monaco", "code": "mc" },
  190. { "name": "Moldova", "code": "md" },
  191. { "name": "Montenegro", "code": "me" },
  192. { "name": "Saint Martin", "code": "mf" },
  193. { "name": "Madagascar", "code": "mg" },
  194. { "name": "Marshall Islands", "code": "mh" },
  195. { "name": "Macedonia", "code": "mk" },
  196. { "name": "Mali", "code": "ml" },
  197. { "name": "Myanmar", "code": "mm" },
  198. { "name": "Mongolia", "code": "mn" },
  199. { "name": "Macao", "code": "mo" },
  200. { "name": "Northern Mariana Islands", "code": "mp" },
  201. { "name": "Martinique", "code": "mq" },
  202. { "name": "Mauritania", "code": "mr" },
  203. { "name": "Montserrat", "code": "ms" },
  204. { "name": "Malta", "code": "mt" },
  205. { "name": "Mauritius", "code": "mu" },
  206. { "name": "Maldives", "code": "mv" },
  207. { "name": "Malawi", "code": "mw" },
  208. { "name": "Mexico", "code": "mx" },
  209. { "name": "Malaysia", "code": "my" },
  210. { "name": "Mozambique", "code": "mz" },
  211. { "name": "Namibia", "code": "na" },
  212. { "name": "New Caledonia", "code": "nc" },
  213. { "name": "Niger", "code": "ne" },
  214. { "name": "Norfolk Island", "code": "nf" },
  215. { "name": "Nigeria", "code": "ng" },
  216. { "name": "Nicaragua", "code": "ni" },
  217. { "name": "Norway", "code": "no" },
  218. { "name": "Nepal", "code": "np" },
  219. { "name": "Nauruan", "code": "nr" },
  220. { "name": "New Zealand", "code": "nz" },
  221. { "name": "Oman", "code": "om" },
  222. { "name": "Panama", "code": "pa" },
  223. { "name": "Peru", "code": "pe" },
  224. { "name": "French Polynesia", "code": "pf" },
  225. { "name": "Papua New Guinea", "code": "pg" },
  226. { "name": "Philippines", "code": "ph" },
  227. { "name": "Pakistan", "code": "pk" },
  228. { "name": "Poland", "code": "pl" },
  229. { "name": "Saint Pierre", "code": "pm" },
  230. { "name": "Pitcairn Islands", "code": "pn" },
  231. { "name": "Puerto Rico", "code": "pr" },
  232. { "name": "Palestine", "code": "ps" },
  233. { "name": "Portugal", "code": "pt" },
  234. { "name": "Palau", "code": "pw" },
  235. { "name": "Paraguay", "code": "py" },
  236. { "name": "Qatar", "code": "qa" },
  237. { "name": "Reunion Island", "code": "re" },
  238. { "name": "Romania", "code": "ro" },
  239. { "name": "Serbia", "code": "rs" },
  240. { "name": "Russia", "code": "ru" },
  241. { "name": "Rwanda", "code": "rw" },
  242. { "name": "Saudi Arabia", "code": "sa" },
  243. { "name": "Solomon Islands", "code": "sb" },
  244. { "name": "Seychelles", "code": "sc" },
  245. { "name": "Sudan", "code": "sd" },
  246. { "name": "Sweden", "code": "se" },
  247. { "name": "Singapore", "code": "sg" },
  248. { "name": "Saint Helena", "code": "sh" },
  249. { "name": "Slovenia", "code": "si" },
  250. { "name": "Svalbard Island", "code": "sj" },
  251. { "name": "Slovakia", "code": "sk" },
  252. { "name": "Sierra Leone", "code": "sl" },
  253. { "name": "San Marino", "code": "sm" },
  254. { "name": "Senegal", "code": "sn" },
  255. { "name": "Somalia", "code": "so" },
  256. { "name": "Suriname", "code": "sr" },
  257. { "name": "South Sudan", "code": "ss" },
  258. { "name": "Sao Tome", "code": "st" },
  259. { "name": "El Salvador", "code": "sv" },
  260. { "name": "Sint Maarten", "code": "sx" },
  261. { "name": "Syria", "code": "sy" },
  262. { "name": "Swaziland", "code": "sz" },
  263. { "name": "Turks and Caicos", "code": "tc" },
  264. { "name": "Chad", "code": "td" },
  265. { "name": "French Southern and Antarctic Lands", "code": "tf" },
  266. { "name": "Togo", "code": "tg" },
  267. { "name": "Thailand", "code": "th" },
  268. { "name": "Tajikistan", "code": "tj" },
  269. { "name": "Tokelau", "code": "tk" },
  270. { "name": "Timor Leste", "code": "tl" },
  271. { "name": "Turkmenistan", "code": "tm" },
  272. { "name": "Tunisia", "code": "tn" },
  273. { "name": "Tonga", "code": "to" },
  274. { "name": "Turkey", "code": "tr" },
  275. { "name": "Trinidad and Tobago", "code": "tt" },
  276. { "name": "Tuvalu", "code": "tv" },
  277. { "name": "Tanzania", "code": "tz" },
  278. { "name": "Ukraine", "code": "ua" },
  279. { "name": "Uganda", "code": "ug" },
  280. { "name": "United States Minor Islands", "code": "um" },
  281. { "name": "United States of America", "code": "us" },
  282. { "name": "Uruguay", "code": "uy" },
  283. { "name": "Uzbekistan", "code": "uz" },
  284. { "name": "Vatican City", "code": "va" },
  285. { "name": "Saint Vincent", "code": "vc" },
  286. { "name": "Venezuela", "code": "ve" },
  287. { "name": "British Virgin Islands", "code": "vg" },
  288. { "name": "Virgin Islands", "code": "vi" },
  289. { "name": "Vietnam", "code": "vn" },
  290. { "name": "Vanuatu", "code": "vu" },
  291. { "name": "Wallis and Futuna", "code": "wf" },
  292. { "name": "Samoa", "code": "ws" },
  293. { "name": "Yemen", "code": "ye" },
  294. { "name": "South Africa", "code": "za" },
  295. { "name": "Zambia", "code": "zm" },
  296. { "name": "Zimbabwe", "code": "zw" }
  297. ]}/>