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

defaultconstant

The flag of Australia (オーストラリア), AU, as an SVG string: viewBox 10080 by 5040 (2:1), 1.2 KB. From Wikimedia Commons, "Flag of Australia (converted).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/au";

Definition

const svg: string = "<svg data-hata=\"au\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 10080 5040\"><defs><clipPath id=\"hata-au-a\"><path d=\"M0 0h6v3H0z\"/></clipPath><clipPath id=\"hata-au-b\"><path d=\"M0 0v1.5h6V3zm6 0H3v3H0z\"/></clipPath><path id=\"hata-au-c\" d=\"m0-360 69.4 215.8 212-80.3L156-35.6 351 80.1 125 99.8l31.2 224.5L0 160l-156.2 164.3 31.1-224.5L-351 80l195-115.7-125.5-188.9 212 80.3z\"/><path id=\"hata-au-d\" d=\"M0-210 54.9-75.5 199.7-65l-111 93.7 34.7 141L0 93.4-123.4 170l34.6-141-111-93.8 145-10.6z\"/></defs><path fill=\"#012169\" d=\"M0 0h10080v5040H0z\"/><path stroke=\"#fff\" stroke-width=\".6\" d=\"m0 0 6 3m0-3L0 3\" clip-path=\"url(#hata-au-a)\" transform=\"scale(840)\"/><path stroke=\"#e4002b\" stroke-width=\".4\" d=\"m0 0 6 3m0-3L0 3\" clip-path=\"url(#hata-au-b)\" transform=\"scale(840)\"/><path stroke=\"#fff\" stroke-width=\"840\" d=\"M2520 0v2520M0 1260h5040\"/><path stroke=\"#e4002b\" stroke-width=\"504\" d=\"M2520 0v2520M0 1260h5040\"/><g fill=\"#fff\"><use href=\"#hata-au-c\" transform=\"translate(2520, 3780) scale(2.1)\"/><use x=\"7560\" y=\"4200\" href=\"#hata-au-c\"/><use x=\"6300\" y=\"2205\" href=\"#hata-au-c\"/><use x=\"7560\" y=\"840\" href=\"#hata-au-c\"/><use x=\"8680\" y=\"1869\" href=\"#hata-au-c\"/><use x=\"8064\" y=\"2730\" href=\"#hata-au-d\"/></g></svg>"

Examples

Example 1

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

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/au";
console.log(svg.startsWith("<svg"),svg.length);
true 1215

What it prints (run when this page was built)

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