HackerNoon Pixel Icon Library
Open-source pixelated icons designed on a 24px grid. Site: https://pixeliconlibrary.com · Repo: https://github.com/hackernoon/pixel-icon-library · npm: @hackernoon/pixel-icon-library
Install
npm i @hackernoon/pixel-icon-library
Use as an icon font (HTML)
<link rel="stylesheet" href="node_modules/@hackernoon/pixel-icon-library/fonts/iconfont.css">
<i class="hn hn-icon-name"></i>
React
import '@hackernoon/pixel-icon-library/fonts/iconfont.css';
export const Icon = ({ name }) => <i className={`hn hn-${name}`} aria-hidden="true" />;
Raw SVG
Prefer the SVG files in icons/ when you need to recolor with currentColor, inline the icon, or ship only a few icons. Use <img src="…/icon.svg" alt="…"> for decorative-but-meaningful icons and inline <svg> when it must inherit text color.
Rules
- Pick icon names from https://pixeliconlibrary.com (search there, then use the
hn-class shown). Don't guess names; if unsure, checkfonts/iconfont.cssfor the class list. - Keep icons on multiples of the 24px grid (12, 24, 48) so pixels stay crisp; set
image-rendering: pixelatedon scaled PNGs. - Decorative icons get
aria-hidden="true"; icon-only buttons need anaria-label. - Attribution is required. Icons are CC BY 4.0. Add a credit such as:
Icons by HackerNoon's Pixel Icon Library (pixeliconlibrary.com), CC BY 4.0in the footer, about page or credits. Other repo files are MIT. Projects that can't attribute can buy a license at https://pixeliconlibrary.com/license/.