Flag Icons is a CSS framework to use flag icons in web projects.
Follow these simple steps and you are ready to go in less than one minute!
Inlcude the flags folder and the CSS file into your project. If you want to customize the CSS or are using SCSS in the project, you can import flag-icons.scss and compile into your main CSS file instead.
<link rel="stylesheet" href="/PATH/flag-icons.min.css">
To add a flag to an element, add class fi
followed by fi-[COUNTRYCODE]
. Example:
<i class="fi fi-se"></i>
If you are using flag-icons in a scss-project you can make some modifications.
Change $image_path
to the path where the images ar located.
Change $image_size
to the size of the images.
Included flag images are created by Jonathan Allen and can also be downloaded from: http://365icon.com/icon-styles/ethnic/classic2/. These are free to use for personal and commercial projects.
You can use any images you want as long as they are named after the ISO 3166-1 alpha-2 standard (two-letter country code).
![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|
Yes |
Yes |
Yes |
Yes |
9 |
The MIT License (MIT)
Copyright (c) 2016 Alexander Erlandsson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.