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 · UM flag SVG

defaultconstant

The flag of U.S. Outlying Islands (合衆国領有小離島), UM, as an SVG string: viewBox 7410 by 3900 (19:10), 742 B. From Wikimedia Commons, "Flag of the United States.svg" (public domain); the /manifest entry gives its author, licence and why it was chosen. It has a viewBox and no width or height, so it fills the box it is put in at its own aspect ratio.

Import it

import value from "@johnmorrisdotca/hata/flags/um";

Definition

const svg: string = "<svg data-hata=\"um\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 7410 3900\"><path fill=\"#b31942\" d=\"M0 0h7410v3900H0\"/><path stroke=\"#fff\" stroke-width=\"300\" d=\"M0 450h7410m0 600H0m0 600h7410m0 600H0m0 600h7410m0 600H0\"/><path fill=\"#0a3161\" d=\"M0 0h2964v2100H0\"/><g fill=\"#fff\"><g id=\"hata-um-d\"><g id=\"hata-um-c\"><g id=\"hata-um-e\"><g id=\"hata-um-b\"><path id=\"hata-um-a\" d=\"m247 90 71 217-185-134h228L176 307z\"/><use y=\"420\" href=\"#hata-um-a\"/><use y=\"840\" href=\"#hata-um-a\"/><use y=\"1260\" href=\"#hata-um-a\"/></g><use y=\"1680\" href=\"#hata-um-a\"/></g><use x=\"247\" y=\"210\" href=\"#hata-um-b\"/></g><use x=\"494\" href=\"#hata-um-c\"/></g><use x=\"988\" href=\"#hata-um-d\"/><use x=\"1976\" href=\"#hata-um-c\"/><use x=\"2470\" href=\"#hata-um-e\"/></g></svg>"

Examples

Example 1

import flag from "@johnmorrisdotca/hata/flags/um";

const host=document.createElement("div");
host.innerHTML = flag; // or toDataUri(flag) from "@johnmorrisdotca/hata" for an <img src>
console.log(host.querySelector("svg")?.getAttribute("viewBox"));

Example 2

import { svg } from "@johnmorrisdotca/hata/flags/um";
console.log(svg.startsWith("<svg"),svg.length);
true 742

What it prints (run when this page was built)

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