How to
Pixicons ships as one small script (123 KB) with every icon included. Add it once, then write icons as plain HTML.
01Add the script
Pick one of the two ways to load the kit. Either way, it's the same script.
From the CDN (jsDelivr)
The simplest: paste this line in the <head> of your page. Nothing to install, and @latest always serves the newest icons, so you never have to change it.
<script src="https://cdn.jsdelivr.net/npm/pixiconsio@latest/pixicons.js"></script>With npm
For projects with a bundler (Vite, webpack, Next.js…). Install the pixiconsio package:
npm install pixiconsioThen import it once, in your app's entry file:
import "pixiconsio";The installed version doesn't change on its own: run npm update pixiconsio to get new icons. Page-wide defaults (below) only work with the script tag.
02Write an icon
Use an <i> with the px class, the icon name, a style and a variant. Find names in the library; each icon's popup gives you the exact HTML.
<i class="px px-heart px-blob px-fill"></i>03Pick a style and a variant
| Class | Regular | Fill |
|---|---|---|
| px-pixel | ||
| px-mosaic | ||
| px-studs | ||
| px-quirky | ||
| px-rounded | ||
| px-blob | ||
| px-liquid | ||
| px-liquid-blob | ||
| px-retro | ||
| px-stitch | ||
| px-knit | ||
| px-dots | ||
| px-halftone | ||
| px-grainy | ||
| px-patchwork |
Variants are px-regular and px-fill. Leave them out and you get px-pixel and px-regular, or set your own defaults for the whole page:
<script src="https://cdn.jsdelivr.net/npm/pixiconsio@latest/pixicons.js" data-style="blob" data-variant="fill"></script>Add px-gridded to show the grid behind an icon, drawn in the spirit of its style (lines, dots, empty studs…), or data-grid="true" on the script for every icon.
04Size and colour
Icons are 1em square and use the current text colour, so style them like text.
<span style="font-size: 32px; color: crimson">
<i class="px px-heart px-liquid px-fill"></i>
</span>Icons added later (React, Vue, AJAX…) are drawn automatically, and changing a class redraws the icon.
05Rather have SVG files?
No script needed. Open any icon in the library, pick a variant, a style and a colour, then copy the SVG or download it. Paste it into your code, Figma or any design tool.