Skip to the content

Hata旗

Load a native country or region flag, choose supported framing and keep each drawing’s source, author and licence.

Hata (旗) is Japanese for a flag. About the name

Contents

Reference · AF--DE-FACTO flag SVG

svgconstant

The Taliban's flag: one of the flags of Afghanistan (アフガニスタン), AF, in real use, as an SVG string: viewBox 1000 by 500 (2:1), 28.8 KB. From Wikimedia Commons, "Flag of the Taliban.svg" (public domain). flag("AF", { variant: "de-facto" }) loads it, and variantsOf("AF") says its status, dates and why it is offered.

Import it

import { svg } from "@johnmorrisdotca/hata/flags/af--de-facto";

Definition

const svg: string

Examples

Example 1

import flag from "@johnmorrisdotca/hata/flags/af--de-facto";

const host=document.createElement("div");
host.innerHTML = flag;
console.log(host.querySelector("svg")?.getAttribute("viewBox"));

Example 2

import { svg } from "@johnmorrisdotca/hata/flags/af--de-facto";
console.log(svg.startsWith("<svg"),svg.length);
true 29533

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hata 1.6.0.