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 · YUCS--KINGDOM flag SVG

svgconstant

The flag of the Kingdom: one of the flags of Yugoslavia (ユーゴスラビア), YUCS, in real use, as an SVG string: viewBox 9 by 6 (3:2), 195 B. From Wikimedia Commons, "Flag of Yugoslavia (1918–1941).svg" (public domain). flag("YUCS", { variant: "kingdom" }) loads it, and variantsOf("YUCS") says its status, dates and why it is offered.

Import it

import { svg } from "@johnmorrisdotca/hata/flags/yucs--kingdom";

Definition

const svg: string = "<svg data-hata=\"yucs--kingdom\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 6\"><path fill=\"#d00\" d=\"M0 4h9v2H0\"/><path fill=\"#fff\" d=\"M0 2h9v2H0\"/><path fill=\"#003893\" d=\"M0 0h9v2H0\"/></svg>"

Examples

Example 1

import flag from "@johnmorrisdotca/hata/flags/yucs--kingdom";

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

Example 2

import { svg } from "@johnmorrisdotca/hata/flags/yucs--kingdom";
console.log(svg.startsWith("<svg"),svg.length);
true 195

What it prints (run when this page was built)

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