No description
Find a file
2021-02-03 06:07:05 +11:00
flags Merge pull request #16 from ramongilmoreno/master 2021-01-07 20:48:36 +11:00
_config.yml Set theme jekyll-theme-cayman 2018-12-06 00:43:05 +11:00
all-flags.md Fix #14 - Correct French Guiana from GE to GF 2020-11-28 05:51:16 +11:00
gallery.css Add a gallery page to visualize all available flags 2020-06-10 16:01:38 +01:00
LICENSE Initial commit 2018-12-05 23:22:57 +11:00
package.json Add package.json & instructions how to install with NPM 2020-12-17 18:40:05 +02:00
README.md Update example flags to better reflect real world 2021-02-03 06:07:05 +11:00
svgo.yml Improve svgo.yml 2020-06-12 19:37:53 +01:00

circle-flags

A collection of circular SVG country flags.

Usage

https://hatscripts.github.io/circle-flags/flags/xx.svg

(Where xx is the ISO 3166-1 alpha-2 code of a country).

For example, the following code:

<img src="https://hatscripts.github.io/circle-flags/flags/br.svg" width="48">
<img src="https://hatscripts.github.io/circle-flags/flags/cn.svg" width="48">
<img src="https://hatscripts.github.io/circle-flags/flags/gb.svg" width="48">
<img src="https://hatscripts.github.io/circle-flags/flags/id.svg" width="48">
<img src="https://hatscripts.github.io/circle-flags/flags/in.svg" width="48">
<img src="https://hatscripts.github.io/circle-flags/flags/ng.svg" width="48">
<img src="https://hatscripts.github.io/circle-flags/flags/ru.svg" width="48">
<img src="https://hatscripts.github.io/circle-flags/flags/us.svg" width="48">

...produces this:

To view all the available flags, check the gallery.

React

If you're using React, you may want to try the react-circle-flags package.

NPM

If you want to install this package as dependency, you can install it from this GitHub repository:

npm install --save https://github.com/HatScripts/circle-flags

Contributing

To contribute, you need to have svgo installed (version 1.2.0 or newer).

First, edit the relevant SVG files in the flags/ directory.

Then run svgo to optimize the SVG files:

svgo ./flags --recursive --config=svgo.yml

Then commit the changes, and submit them as a pull request.

License

This project is released under the MIT license.