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 · NR.1X1 flag SVG

defaultconstant

The flag of Nauru (ナウル), NR, drawn again by hand at 1:1 by flag-icons 7.5.0 (MIT), as an SVG string: viewBox 512 by 512, 622 B. The drawing flag("NR", { shape: "1:1" }) uses (and the round frame, in a circle), made for that shape by hand rather than cut from the flag. The /manifest entry's framings say how each frame was chosen.

Import it

import value from "@johnmorrisdotca/hata/flags/nr.1x1";

Definition

const svg: string = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><defs><clipPath id=\"hata-nr-1x1-a\"><path fill-opacity=\".7\" d=\"M135.6 0h496.1v496h-496z\"/></clipPath></defs><g fill-rule=\"evenodd\" stroke-width=\"1pt\" clip-path=\"url(#hata-nr-1x1-a)\" transform=\"translate(-140)scale(1.0321)\"><path fill=\"#002170\" d=\"M0 0h992.1v496H0z\"/><path fill=\"#ffb20d\" d=\"M0 226.8h992.1v42.4H0z\"/><path fill=\"#fff\" d=\"m292.4 424.4-31.9-32-10.2 44-11.7-43.7-30.9 33 11.8-43.6-43.2 13 32-31.8-44-10.3 43.6-11.6-33-31 43.6 11.8-13-43.2 31.8 32 10.3-44 11.7 43.6 30.8-32.9-11.7 43.6 43.2-13-32 31.8 44 10.3L290 362l33 30.9-43.7-11.7z\"/></g></svg>"

Examples

Example 1

import square from "@johnmorrisdotca/hata/flags/nr.1x1";

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

Example 2

import { svg } from "@johnmorrisdotca/hata/flags/nr.1x1";
console.log(svg.startsWith("<svg"),svg.length);
true 622

What it prints (run when this page was built)

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