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

On-demand flag loading

import { … } from "@johnmorrisdotca/hata/load";

3929.4 kB minified and gzipped, with everything it imports (measured with esbuild)

Exports

NameKindWhat it is
flagfunctionA flag's SVG string by its code, loaded when asked for: one dynamic import of /flags/<code>.
flagDataUrifunctionA flag as a data: URI by its code, loaded when asked for: ready for an <img src> or a CSS url().
FlagOptionstypeWhat flag() takes: everything frame() takes, and variant, which of the place's flags in real use to load.
FrameOptionstypeHow to frame a flag: its shape, how it fits, and a label for assistive technology.

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