1) Generated outputs
The sprite contains symbol ids like sf-a (outline) and sf-a-plain (plain).
2) Quick controls
Live bunting (Web Component)
Live pattern (Web Component)
This previews the repeating /pattern.svg tile as an SVG pattern fill.
How it looks as a real CSS background
Copy/paste CSS snippet (background)
This does not require Web Components — it just uses /pattern.svg.
Copy/paste snippet (bunting)
Use this on any page (assumes signal-flags.css + signal-flags.js are loaded).
Single flag (Web Component)
Use <signal-flag> when you want one flag instead of a string of flags.
It renders a single symbol from /sprite.svg.
code= the character to render (A–Zor0–9)variant=outline/plain/vintage/vintage-plainsize= pixel size (or use the CSP-safe size classes likesf-size-24)
Example:
<!-- load once on the page -->
<link rel="stylesheet" href="/signal-flags.css">
<script type="module" src="/signal-flags.js"></script>
<!-- use anywhere -->
<signal-flag code="A" size="40" variant="outline"></signal-flag>
<!-- CSP-safe sizing alternative (if you prefer classes) -->
<signal-flag code="A" class="sf-size-40" variant="outline"></signal-flag>
(If you don’t have sf-size-40, use the presets you do have, e.g. sf-size-24, sf-size-28, etc.)
Export
Exports the currently rendered bunting / pattern / single flag as standalone SVG files (Canva-friendly).
3) “Raw” sprite usage (no JS)
This is the core trick: reference a symbol inside the sprite via <use>.
<svg width="64" height="64">
<use href="signal-flags/sprite.svg#sf-a"></use>
</svg>
4) Full grid
How you use this in another container
- Mount the shared volume into your app at
/public/signal-flags(read-only). - Serve that folder as static files.
- In your HTML: load
/signal-flags.css+/signal-flags.jsand use the Web Components.
<!-- load once (in <head> / end of <body>) -->
<link rel="stylesheet" href="/signal-flags/signal-flags.css">
<script type="module" src="/signal-flags/signal-flags.js"></script>
<!-- bunting (multiple flags from text) -->
<signal-bunting text="9MEI2026" size="56" variant="outline"></signal-bunting>
<!-- single flag -->
<signal-flag code="A" size="40" variant="outline"></signal-flag>