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 · CH-BS flag SVG

defaultconstant

The flag of Basel-Stadt (バーゼル=シュタット準州), CH-BS, as an SVG string: viewBox 470 by 470 (1:1), 1.1 KB. From Wikimedia Commons, "Flag of Canton of Basel.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/ch-bs";

Definition

const svg: string = "<svg data-hata=\"ch-bs\" xmlns=\"http://www.w3.org/2000/svg\" xml:space=\"preserve\" viewBox=\"-206.28 -206.68 470 470\"><path fill=\"#fff\" d=\"M-206.28-206.68h470v470h-470z\"/><path fill=\"#010202\" d=\"M90.4 41.5H-23.52l-29.94 194.76 50.75-39.59 36.14 40.38v.03-.03l36.16-40.38 50.75 39.6zm12-11.58a7.4 7.4 0 0 0-7.27-7.48l-.17.02H-28.33l-.16-.02a7.36 7.36 0 0 0-7.26 7.48 7.36 7.36 0 0 0 7.26 7.47h.04v.04h123.6v-.04a7.4 7.4 0 0 0 7.24-7.47m-6.83-48.71c0-4.1-2.94-7.45-6.56-7.45l-.13.01h-111.1l-.14-.01c-3.61 0-6.54 3.34-6.54 7.45 0 4.13 2.93 7.5 6.54 7.5l.02-.02v.04H89.02v-.04c3.62 0 6.54-3.35 6.54-7.48m6.39 12.12H-34.99c-6.6 0-11.96 5.51-11.96 12.31 0 6.78 5.37 12.3 11.98 12.3h136.92c6.61 0 11.96-5.52 11.96-12.3 0-6.8-5.36-12.31-11.96-12.31M-62.63-91.34c2.92-14.26 21.76-19.57 33.57.25 4.62 7.75 7.56 50.8-41.36 49.3-29.69-.92-50.87-37.54-42.35-76.84 8.56-39.45 47.22-62.65 80.8-61.78 58.64 1.5 88.58 47.83 97.1 73.8 7.78 23.8 12.37 55.7 12.17 75.89h-87.84c6.14-36.66 2.43-51.6 2.43-51.6s-8.54-37.28-34.07-37.28c-25.55 0-30.92 23.27-30.92 23.27s-2.8 18.21 9.97 21.01c3.43.76 10.12.23 10.12-8.52-.01-4.35-3.48-8.26-9.62-7.5\"/></svg>"

Examples

Example 1

import flag from "@johnmorrisdotca/hata/flags/ch-bs";

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

What it prints (run when this page was built)

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