A curated collection of all country flags in SVG, plus the CSS for easier integration. For using the flags inline with text add the classes .fi and .fi-xx (where xx is the ISO 3166-1-alpha-2 code of a country) to an empty <span>. If you want to have a squared version flag then add the class fis as well. You could also apply this to any element, but in that case you'll have to use the fib instead of fi and you're set. This means that the flag is just going to appear in the middle of an element, so you will have to set manually the correct size of 4 by 3 ratio or if it's squared add also the flag-icon-squared class. To have only specific countries in the css file, remove the ones that you don't need from the flag-icons-list.less file and build it again.

Features

  • All flags are in 1x1 and 4x3 formats only
  • ISO 3166-1-alpha-2 Flags
  • CSS for easier integration
  • You can either download the whole project as is or install it via npm or Yarn
  • Run the yarn to install the dependencies after cloning the project
  • To have only specific countries in the css file, remove the ones that you don't need

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow flag-icons

flag-icons Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of flag-icons!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript HTML XHTML, JavaScript Multimedia Software, JavaScript Photo Management Software

Registered

2022-06-15