Open GIS icon set — available as an SVG sprite, icon font (woff2/woff), and CSS/SCSS classes.
Live preview: https://ogis.org/icons/
npm install @ogis/iconsImport the stylesheet and use <i> tags with oi-{name} classes:
@import "@ogis/icons/css";<i class="oi-search"></i> <i class="oi-gear"></i>Import the full SCSS file (includes @font-face and all icon classes):
@use "@ogis/icons/scss";If you only need the $ogis-icons-map Sass variable (no generated classes):
@use "@ogis/icons/scss-variables" as *;
.my-icon::before {
content: map-get($ogis-icons-map, "search");
}Copy or serve node_modules/@ogis/icons/dist/ogis-icons.svg and reference icons by ID:
<svg width="16" height="16">
<use href="/assets/ogis-icons.svg#search"></use>
</svg>All assets are available via jsDelivr — no install required.
Replace @0.1.0 with the version you want, or use @latest to always get the newest release.
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@ogis/icons/dist/ogis-icons.css"
/>
<i class="oi-search"></i>
<i class="oi-gear"></i><svg width="16" height="16">
<use
href="https://cdn.jsdelivr.net/npm/@ogis/icons/dist/ogis-icons.svg#search"
></use>
</svg>Note: Browsers block cross-origin
<use href="…">references to external SVG files. Either self-host the sprite or inline it at the top of your HTML before using fragment references.
Set size with font-size and color with color:
<i class="oi-search" style="font-size: 1.5rem; color: steelblue;"></i>Or in CSS:
.oi-search {
font-size: 1.5rem;
color: steelblue;
}Set size with width / height attributes (or equivalent CSS). Set icon color with the fill attribute:
<svg width="24" height="24" fill="steelblue">
<use href="/assets/ogis-icons.svg#search"></use>
</svg>Regenerates everything in dist/ from the SVG sources in src/svg/:
npm run buildThe build pipeline:
- PNG → SVG — traces any PNGs in
src/png/with Potrace and optimises them with SVGO. - Normalise — scales all SVGs to a 16 × 16 viewBox.
- SVG sprite — bundles all icons into
dist/ogis-icons.svg. - Icon font — generates
ogis-icons.woff2/.woffplus CSS, SCSS, and JSON outputs. - SCSS variables — writes
dist/ogis-icons-variables.scsswith the$ogis-icons-map.
Start a local dev server (uses Vite):
npm run dev- Place new
.svgfiles insrc/svg/(or.pngfiles insrc/png/for auto-tracing), then runnpm run build. - Codepoint assignments are persisted in
src/codepoints.jsonso existing icons keep stable Unicode values.
| File | Description |
|---|---|
dist/ogis-icons.svg |
SVG symbol sprite |
dist/ogis-icons.woff2 |
Icon font (woff2) |
dist/ogis-icons.woff |
Icon font (woff) |
dist/ogis-icons.css |
CSS with @font-face + .oi-* classes |
dist/ogis-icons.scss |
SCSS with @font-face + .oi-* classes |
dist/ogis-icons-variables.scss |
SCSS variables only (no classes) |
dist/ogis-icons.json |
Codepoint map as JSON |
MIT