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 · RE--LOCAL flag SVG

defaultconstant

The Lofo: one of the flags of Réunion (レユニオン), RE, in real use, as an SVG string: viewBox 120 by 80 (3:2), 277 B. From Wikimedia Commons, "Proposed flag of Réunion (VAR).svg" (public domain). flag("RE", { variant: "local" }) loads it, and variantsOf("RE") says its status, dates and why it is offered.

Import it

import value from "@johnmorrisdotca/hata/flags/re--local";

Definition

const svg: string = "<svg data-hata=\"re--local\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 120 80\"><path fill=\"#36f\" d=\"M0 0h120v80H0z\"/><path fill=\"red\" d=\"M60 40 0 80h120z\"/><g fill=\"#ff0\"><path d=\"M0 37v6l120-6v6z\"/><path d=\"M60 40 0 5V0h5zl55-40h5v5z\"/><path d=\"M60 40 57 0h6z\"/></g></svg>"

Examples

Example 1

import flag from "@johnmorrisdotca/hata/flags/re--local";

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

Example 2

import { svg } from "@johnmorrisdotca/hata/flags/re--local";
console.log(svg.startsWith("<svg"),svg.length);
true 277

What it prints (run when this page was built)

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