Skip to content

Country Flags

SVG country flags with metadata (ISO code, dial code, timezones) from @signicat/catnip-assets.

Usage

Flags are stored in countries/flags/ with ISO 3166-1 alpha-2 codes (e.g. NO.svg, SE.svg):

js
import flagUrl from "@signicat/catnip-assets/countries/flags/NO.svg";
html
<img src="/path/to/NO.svg" alt="Norway" width="24" height="24" />

For inline SVG rendering, the package also exposes lazy loaders:

js
import { loadCountryFlag, loadCountryFlags } from "@signicat/catnip-assets/countries/flags/svg";

const norwaySvg = await loadCountryFlag("NO");
const allFlagSvgs = await loadCountryFlags();

Country Data

The package exports country metadata (name, code, dial_code, timezones):

js
import countries from "@signicat/catnip-assets/countries/index.js";

// Array of { name, code, dial_code, timezones }
const norway = countries.find((c) => c.code === "NO");
// { name: "Norway", code: "NO", dial_code: "+47", timezones: ["Europe/Oslo"] }

Catnip Design System by Signicat