Docs
Pixelarticons is a plain SVG icon set with a React build on top. There is no runtime, no configuration file and no build step you have to adopt. Install the package, import an icon, done.
One point catches developers out, so it comes first: the Pro set installs through npm too. You do not have to drop a zip file into your repository.
On this page
Free set
880 icons, MIT licensed, straight from npm.
npm install pixelarticons Pro set
All 4600 icons, unlocked in the same package by one command.
npx pixelarticons upgrade --key=… Install
The package holds the SVG source files, ready-made React components with TypeScript types, and a webfont. Node 18 or later.
npm install pixelarticons
# pnpm add pixelarticons
# yarn add pixelarticons
# bun add pixelarticons Without an install
Every free icon is on unpkg. Replace heart
with any icon name in kebab-case.
<img src="https://unpkg.com/pixelarticons@latest/svg/heart.svg" width="24" height="24" alt="Heart" /> Unlock the Pro icons through npm
A Pro license does not move you to a different package. It unlocks the package you already installed. Run the upgrade command in your project:
npx pixelarticons upgrade --key=YOUR_LICENSE_KEY The key is checked against your Gumroad purchase.
All 4600 SVG files replace the free ones in the package.
The React components are generated again from the new files.
Your import paths do not change. The icons that were missing before now resolve:
import { Heart, Sliders, AlarmClockCheck } from 'pixelarticons/react'
// Heart shipped in the free set. Sliders and AlarmClockCheck were Pro only,
// and resolve from the same import after the upgrade.
<Sliders width={48} height={48} /> Before you run it
- Find the license key in your Gumroad library or in the purchase receipt.
- The command needs the
unzipprogram on the machine. - Run it in the project that has
pixelarticonsinstalled, not in an empty directory. - The verify endpoint is rate limited. Do not call it in a loop.
- You prefer a zip archive? Paste the same key on the download page.
Fresh installs, teammates and CI
The upgrade writes into the installed package. A clean install therefore brings back the free set, on your machine and on the build server. Pick one of these two patterns.
Option A: run it after every install
Add a postinstall script and keep the key in an environment variable, so it never reaches your repository. Set the same variable as a secret in your CI.
{
"scripts": {
"postinstall": "pixelarticons upgrade --key=$PIXELARTICONS_LICENSE_KEY"
}
}
On Windows PowerShell the variable syntax is $env:PIXELARTICONS_LICENSE_KEY.
Builds that run without network access must use option B.
Option B: copy the icons into your repository
The most predictable option, and the one to pick for offline builds. Run the upgrade once, copy the SVG files across, and treat them as project assets.
# Run once, then commit the result to your own repository.
npx pixelarticons upgrade --key=YOUR_LICENSE_KEY
mkdir -p src/icons
cp node_modules/pixelarticons/svg/*.svg src/icons/ Keep that repository private. The Pro license covers use in your products, not redistribution of the icon set.
React
Every icon is a component with full TypeScript types. Components accept all standard
SVG props, default to 24 by 24, and paint with
currentColor,
so text colour utilities work on them.
import { Heart, Home, Bell } from 'pixelarticons/react'
export default function App() {
return (
<>
<Heart width={48} height={48} />
<Home className="text-blue-500" />
<Bell style={{ color: 'red' }} onClick={ring} />
</>
)
} Bundlers that do not tree-shake barrel files can import a single component instead:
import { Heart } from 'pixelarticons/react/Heart'
Import from pixelarticons/react
or pixelarticons/svg,
never from the package root. The components are client side, so render them with
client:only="react" in Astro.
Raw SVG and other frameworks
There is no Vue or Svelte package, and none is needed. The
svg/
directory holds one file per icon, so any framework can consume it.
<!-- Straight from node_modules, bundled by Vite, webpack or Rollup -->
<img src="/node_modules/pixelarticons/svg/heart.svg" width="24" height="24" alt="Heart" />
To colour an icon with CSS, inline it instead of loading it through an
img tag:
// Vite, Astro, Nuxt and SvelteKit: import the file as a string
import heart from 'pixelarticons/svg/heart.svg?raw'
// Vue
<span v-html="heart" />
// Svelte
{@html heart}
// Astro
<Fragment set:html={heart} /> For an auto-imported icon component in Vue, Svelte or Solid, register the directory as a custom collection:
// vite.config.js
import Icons from 'unplugin-icons/vite'
import { FileSystemIconLoader } from 'unplugin-icons/loaders'
export default {
plugins: [
Icons({
customCollections: {
px: FileSystemIconLoader('node_modules/pixelarticons/svg'),
},
}),
],
}
// Then, in any component:
import IconHeart from '~icons/px/heart' Icon font
The package ships a prebuilt webfont in woff2, woff, ttf, eot and svg, with a stylesheet in CSS, SCSS, Less and Stylus. One class per icon.
import 'pixelarticons/fonts/pixelart-icons-font.css'
<i class="pixelart-icons-font-heart"></i>
<i class="pixelart-icons-font-heart-solid"></i> The webfont covers the free icons. The upgrade command adds SVG files and React components, and does not rebuild the font, so Pro icons need one of the routes above.
CSS and Tailwind
A CSS mask keeps the icon colourable while it stays an external file. The element colour drives the icon colour, so hover and dark mode need no second file.
.icon-heart {
width: 24px;
height: 24px;
background-color: currentColor;
mask: url('/icons/heart.svg') center / contain no-repeat;
} With inline SVG, Tailwind utilities are enough:
<!-- Recolor and resize an inline SVG with utilities alone -->
<span class="text-primary [&_svg]:w-12 [&_svg]:h-12">
<!-- inline <svg fill="currentColor"> here -->
</span> Names and styles
File names are kebab-case and describe function, not appearance. React components use the PascalCase form of the same name. Most icons exist in four styles; the base style carries no suffix.
heart.svg -> <Heart /> base, the default
heart-sharp.svg -> <HeartSharp /> hard 90 degree corners
heart-solid.svg -> <HeartSolid /> filled, rounded corners
heart-glyph.svg -> <HeartGlyph /> filled, hard corners
alarm-clock.svg -> <AlarmClock /> kebab-case turns into PascalCase Compare the four styles to see which one fits your interface, or search the full set to find an exact name.
Sizing rules
Each icon sits on a 24 by 24 grid with no anti-aliasing. Scale in multiples of 24 and the pixels stay square. Scale to 30 or 40 pixels and the edges blur, because the grid no longer lands on whole device pixels.
<!-- Good: multiples of the 24px grid -->
<Heart width={24} height={24} />
<Heart width={48} height={48} />
<Heart width={96} height={96} />
<!-- For raster scaling, keep the edges hard -->
<img src="heart.svg" width="96" height="96" style="image-rendering: pixelated" /> Mini icons use an 8 by 8 grid, so their multiples are 8, 16, 32 and 64.
Mini, Prime and design files
The npm package carries the Base set. Mini and Prime are separate sets with their own licenses, delivered as downloads from Gumroad rather than through npm. Drop their SVG files into your project and use them exactly like the samples above.
| Set | Grid | Delivery | Formats |
|---|---|---|---|
| Base | 24 × 24 | npm, plus zip | SVG, React, font, Figma, IconJar |
| Prime | 24 × 24 | Zip from Gumroad | SVG, Figma, IconJar |
| Mini | 8 × 8 | Zip from Gumroad | SVG, PNG, Figma |
Designers can also start from the free Figma community file. Every license includes the full Figma library.
Troubleshooting
Can I use the Pro icons through npm? +
Yes. Install the free package with npm install pixelarticons, then run npx pixelarticons upgrade --key=YOUR_LICENSE_KEY. The command verifies the license, downloads all 4600 icons into the installed package and regenerates the React components. Your imports stay the same.
My Pro icons disappeared after npm ci. Why? +
The upgrade command writes into the installed pixelarticons package, so any clean install replaces it with the free set again. Add the upgrade command as a postinstall script, or copy the SVG files into your own repository once.
How do I get the icon files again after a new release? +
Open pixelarticons.com/download and paste your Base Pro license key. You get the current archive, with every icon added since your purchase. Your license includes lifetime updates, so the page works after every release.
The command says the license key is invalid. +
The upgrade command accepts license keys for the Base Pro product. Keys for Mini, Prime and the Complete bundle are not accepted by the command; those sets are delivered as downloads from Gumroad. Copy the key from your Gumroad library or your purchase receipt, without spaces. Write to halfmage@gmail.com if the key is still refused.
The command says unzip is not installed. +
The upgrade command extracts the icon archive with the unzip program. Install it first: apk add unzip on Alpine, apt-get install unzip on Debian or Ubuntu, brew install unzip on macOS.
Do I have to change my imports after the upgrade? +
No. The paths pixelarticons/react and pixelarticons/svg stay the same. Only the number of available icons changes.
Does the upgrade work in an offline build? +
No. The command contacts pixelarticons.com to verify the license and to download the archive. For offline or air-gapped builds, copy the SVG files into your own repository.
Which icons are free? +
880 icons are free under the MIT license and ship in the npm package. You can use them in personal and commercial work without attribution. The full set of 4600 icons needs a one-time Pro license.
Can I put the Pro icons in a public repository? +
Use them in your products, including client work. Do not publish the icon files as a set: the Pro license does not permit redistribution. Keep repositories that contain the full set private.
Still stuck?
Report a problem with the free package on GitHub, or write to halfmage@gmail.com about a license or a download.