iso-country-flagss
v1.0.1
Published
ISO-based country flag assets with static PNG and animated GIF exports.
Downloads
150
Maintainers
Readme
iso-country-flags
ISO-based country flag asset package with static PNG and animated GIF exports.
Created and maintained by Sifat Ahmed.
Developer
- Website: https://sifatahmed.com
- GitHub: https://github.com/devSifatAhmed
- Facebook: https://www.facebook.com/devSifatAhmed75
- YouTube: https://www.youtube.com/@DevSifat
Install
npm install iso-country-flagsUsage
import { flags } from "iso-country-flags";
const bangladeshPng = flags.static.bd;
const bangladeshGif = flags.emoji.bd;
const usPng = flags.get("us", "static");
const usGif = flags.get("us", "emoji");import { flags as emojiFlags } from "iso-country-flags/emoji";
import { flags as staticFlags } from "iso-country-flags/static";Aliases are also available:
import { flags as emojiFlags } from "iso-country-flags/3d";
import { flags as staticFlags } from "iso-country-flags/2d";API
flags.static.<isoCode>returns the PNG asset URL.flags.emoji.<isoCode>returns the GIF asset URL.flags.get(code, variant)returns either a PNG or GIF asset URL.iso-country-flags/staticexports only PNG flag URLs.iso-country-flags/emojiexports only GIF flag URLs.iso-country-flags/2dis an alias ofstatic.iso-country-flags/3dis an alias ofemoji.
Notes
- Most ISO folders contain both
flag.pngandflag.gif. twcurrently has a legacy PNG.ncyandxkcurrently do not include a PNG replacement source in this workspace.
Branding
Developer: Sifat Ahmed
If you use this package in a project, the npm package page and repository metadata can visibly credit the developer through the package name, author field, homepage, repository, and social links.
