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

svgconstant

The flag of Iraq (イラク), IQ, as an SVG string: viewBox 11880 by 7920 (3:2), 1.2 KB. From Wikimedia Commons, "Flag of Iraq.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 { svg } from "@johnmorrisdotca/hata/flags/iq";

Definition

const svg: string = "<svg data-hata=\"iq\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 11880 7920\"><title>Flag of Iraq</title><path fill=\"#fff\" d=\"M0 0h11880v7920H0z\"/><path fill=\"#cd1125\" d=\"M0 0h11880v2640H0z\"/><path d=\"M0 5280h11880v2640H0z\"/><path fill=\"#017b3d\" d=\"M5864 4515H3929a288 248 0 0 1-365 215c271-133 254-268 83-568 95-34 110-43 206-108-68 206 176 181 356 181 0-72 7-154-47-165 70-25 76-33 187-127v277h1335v-190a40 40 0 0 0-80 0v110a30 30 0 0 1-30 30H4554v-180l766-740c-5 38 74 140 107 157-25 4-53-1-71 17l-627 606h695c0-161 150-161 220-218 70 57 220 57 220 218zm145 0V3250c71 39 126 84 214 106-4 50-49 66-49 101v778c98 22 120-35 167-64 12 124 91 246 88 344zm1322-845 155-130v680h110v-773c54-45 124-94 155-151v1219h-975c-14-252-14-511 280-455v-103c0-24-36-5-36-27l201-168v458h110zm-51-348c-19 1-48-103-41-123 7-23 33-23 44-12 18 17 16 134-3 135m-181 141c-55-32-46-45 2-31 83 25 125 4 185-57l45 23c59 30 95 17 116-55 6-22 24-16 29 9 19 100-57 131-134 103-42-14-49-14-70 2-46 36-112 42-173 6m797 1052V3250c71 39 126 84 214 106-4 50-49 66-49 101v778c98 22 120-35 167-64 12 124 91 246 88 344zm-3791 140a1 1 0 0 1 118 0 1 1 0 0 1-118 0m2861-460a45 34 0 0 0 90 0 45 34 0 0 0-90 0\"/></svg>"

Examples

Example 1

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

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

What it prints (run when this page was built)

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