{"id":23103933,"url":"https://github.com/benaubin/tiny-flag-react","last_synced_at":"2025-08-16T15:32:52.829Z","repository":{"id":65516538,"uuid":"275902052","full_name":"benaubin/tiny-flag-react","owner":"benaubin","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-12T16:19:44.000Z","size":17,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-17T18:11:27.577Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benaubin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-29T19:01:45.000Z","updated_at":"2022-03-30T21:49:03.000Z","dependencies_parsed_at":"2023-01-26T22:25:13.298Z","dependency_job_id":null,"html_url":"https://github.com/benaubin/tiny-flag-react","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benaubin%2Ftiny-flag-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benaubin%2Ftiny-flag-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benaubin%2Ftiny-flag-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benaubin%2Ftiny-flag-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benaubin","download_url":"https://codeload.github.com/benaubin/tiny-flag-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230044012,"owners_count":18164103,"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":[],"created_at":"2024-12-17T00:29:53.811Z","updated_at":"2024-12-17T00:29:53.873Z","avatar_url":"https://github.com/benaubin.png","language":"TypeScript","readme":"# Tiny Flag React\n\nDisplay country flags in less than 1KB with the magic of unicode (with graceful fallbacks).\n\nDisplays emoji by default, when not supported, falls back to an image tag.\n\n[DEMO](https://codesandbox.io/s/country-flags-wz5g7?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\n\n## Install\n\n```sh\nnpm i --save tiny-flag-react\nyarn add tiny-flag-react\n```\n\n## Usage\n\n```js\nimport TinyFlag from \"tiny-flag\";\n\n\u003cTinyFlag\n  country=\"US\" // ISO 3166-1 alpha-2 code\n  alt=\"United States Flag\" // Used as the image alt tag\n  fallbackImageURL=\"https://cdn.jsdelivr.net/npm/react-flagkit@1.0.2/img/SVG/US.svg\" // Used when emoji flags are not supported.\n/\u003e;\n```\n\n[DEMO](https://codesandbox.io/s/country-flags-wz5g7?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\n\n## Recommended Fallback Images\n\nGoes well with [FlagKit](https://github.com/madebybowtie/FlagKit.git) and Webpack's\n[file-loader](https://webpack.js.org/loaders/file-loader/) for fallback images:\n\n```sh\nnpm i --save https://github.com/madebybowtie/FlagKit.git\nyarn add https://github.com/madebybowtie/FlagKit.git\n```\n\n```js\nlet country = \"US\";\nlet countryName = \"United States\";\n\n\u003cTinyFlag\n  country={country}\n  countryName={countryName}\n  fallbackImageURL={require(\"FlagKit/Assets/SVG/\" + country + \".svg\").default}\n\u003e\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenaubin%2Ftiny-flag-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenaubin%2Ftiny-flag-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenaubin%2Ftiny-flag-react/lists"}