{"id":2514776,"url":"https://lipis.github.io/flag-icon-css","last_synced_at":"2025-07-31T17:31:12.914Z","repository":{"id":10822905,"uuid":"13099301","full_name":"lipis/flag-icons","owner":"lipis","description":":flags: A curated collection of all country flags in SVG — plus the CSS for easier integration","archived":false,"fork":false,"pushed_at":"2024-11-27T02:05:57.000Z","size":16495,"stargazers_count":10790,"open_issues_count":25,"forks_count":1863,"subscribers_count":155,"default_branch":"main","last_synced_at":"2024-11-30T22:02:48.387Z","etag":null,"topics":["country","country-flags","css","icon-css","svg"],"latest_commit_sha":null,"homepage":"https://flagicons.lipis.dev","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lipis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-09-25T16:39:58.000Z","updated_at":"2024-11-30T21:11:52.000Z","dependencies_parsed_at":"2023-01-16T19:46:15.190Z","dependency_job_id":"177e2403-4330-40c3-a55a-3848ff723d05","html_url":"https://github.com/lipis/flag-icons","commit_stats":{"total_commits":906,"total_committers":94,"mean_commits":9.638297872340425,"dds":0.4326710816777042,"last_synced_commit":"02b8adceb338125c61f7a1d64d6e5bd9826ae427"},"previous_names":["lipis/flag-icon-css"],"tags_count":103,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lipis%2Fflag-icons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lipis%2Fflag-icons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lipis%2Fflag-icons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lipis%2Fflag-icons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lipis","download_url":"https://codeload.github.com/lipis/flag-icons/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228271066,"owners_count":17894452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["country","country-flags","css","icon-css","svg"],"created_at":"2024-01-27T04:07:06.973Z","updated_at":"2025-07-31T17:31:12.904Z","avatar_url":"https://github.com/lipis.png","language":"CSS","funding_links":[],"categories":["Map / Countries"],"sub_categories":[],"readme":"# flag-icons\n\n\u003e A curated collection of all country flags in SVG — plus the CSS for easier integration. See the [demo](https://flagicons.lipis.dev).\n\n## Install\n\nYou can either [download](https://github.com/lipis/flag-icons/archive/main.zip) the whole project as is or install it via npm or Yarn:\n\n```bash\nnpm install flag-icons\n# or\nyarn add flag-icons\n```\n\n## Usage\n\nFirst, you need to import css:\n\n```js\nimport \"/node_modules/flag-icons/css/flag-icons.min.css\";\n```\n\nor use CDN:\n\n```html\n\u003clink\n  rel=\"stylesheet\"\n  href=\"https://cdn.jsdelivr.net/gh/lipis/flag-icons@7.3.2/css/flag-icons.min.css\"\n/\u003e\n```\n\nor use SASS:\n\n```scss\n@use \"node_modules/flag-icons/sass/flag-icons\";\n\n// or with custom configuration\n@use \"node_modules/flag-icons/sass/flag-icons\" with (\n  // Override path to flags directory\n  $flag-icons-path: \"node_modules/flag-icons/flags\",\n\n  // Include only specific country flags\n  $flag-icons-included-countries: (\"gr\", \"de\", \"gb\")\n);\n```\n\nYou can find all available variables in [`sass/_variables.scss`](sass/_variables.scss).\n\nFor using the flags inline with text add the classes `.fi` and `.fi-xx` (where `xx` is the [ISO 3166-1-alpha-2 code](https://www.iso.org/obp/ui/#search/code/) of a country) to an empty `\u003cspan\u003e`. If you want to have a squared version flag then add the class `fis` as well. Example:\n\n```html\n\u003cspan class=\"fi fi-gr\"\u003e\u003c/span\u003e \u003cspan class=\"fi fi-gr fis\"\u003e\u003c/span\u003e\n```\n\nYou 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 will add the correct background with the following CSS properties:\n\n```css\nbackground-size: contain;\nbackground-position: 50%;\nbackground-repeat: no-repeat;\n```\n\nWhich 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.\n\n## Development\n\nRun the `yarn` to install the dependencies after cloning the project and you'll be able to:\n\nTo build `*.scss` files\n\n```bash\n$ yarn build\n```\n\nTo serve it on `localhost:8000`\n\n```bash\n$ yarn start\n```\n\nTo have only specific countries in the css file, remove the ones that you don't need from the [`_flag-icons-list.scss`](sass/_flag-icons-list.scss) file and build it again.\n\n## Credits\n\n- This project wouldn't exist without the awesome and now deleted collection of SVG flags by [koppi](https://github.com/koppi).\n- Thank you [Andrejs Abrickis](https://twitter.com/andrejsabrickis) for providing the `flag-icons` name on [npm](https://www.npmjs.com/package/flag-icons).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/lipis.github.io%2Fflag-icon-css","html_url":"https://awesome.ecosyste.ms/projects/lipis.github.io%2Fflag-icon-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/lipis.github.io%2Fflag-icon-css/lists"}