{"id":13397691,"url":"https://github.com/lipis/flag-icons","last_synced_at":"2025-05-12T20:46:06.218Z","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":"2025-04-22T02:20:10.000Z","size":16919,"stargazers_count":11222,"open_issues_count":22,"forks_count":1911,"subscribers_count":155,"default_branch":"main","last_synced_at":"2025-05-05T16:06:17.420Z","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,"zenodo":null}},"created_at":"2013-09-25T16:39:58.000Z","updated_at":"2025-05-05T08:17:31.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":107,"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":253639580,"owners_count":21940446,"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-07-30T18:01:39.474Z","updated_at":"2025-05-12T20:46:06.068Z","avatar_url":"https://github.com/lipis.png","language":"CSS","funding_links":[],"categories":["HTML","CSS","css","前端开发框架及项目"],"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.2.3/css/flag-icons.min.css\"\n/\u003e\n```\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/github.com%2Flipis%2Fflag-icons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flipis%2Fflag-icons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flipis%2Fflag-icons/lists"}