Skip to content

pennantsEvery flag, every shape, one API

271 country flags as pennants (the signature style), rectangles, squares and circles. SVG, PNG, CSS, sprite, tree-shakable JS, React and a Web Component; you only ship the flags you show.

Quick start ​

sh
npm install pennants
js
import 'pennants/css';
html
<span class="pn pn-ar" role="img" aria-label="Argentina"></span>

Pick a format ​

CSS
import 'pennants/css';

<span class="pn pn-ar" role="img" aria-label="Argentina"></span>

One stylesheet per shape, combinable on one page, no JavaScript; each image loads only when its class is used. With Vite, use the cdn variant or set assetsInlineLimit (see FAQ).

Not sure? Read Which format should I use? or see every flag in the gallery.

MIT licensed. Flag artwork from flag-icons (MIT).