Nitro Icons
A clean, scalable icon library with 337+ icons. Auto-generated React components with full TypeScript support, tree-shaking, and inline customization.
Introduction
Nitro Icons is a developer-first icon system built for React and Next.js applications. Every icon is an individual React component — import only what you need, and your bundler tree-shakes the rest.
Installation
Install the React package from npm. The package has React 18+ as a peer dependency.
npm install @nitroicons/reactOr with other package managers:
yarn add @nitroicons/reactpnpm add @nitroicons/reactBasic Usage
Import any icon by its PascalCase name and use it as a React component.
import { Home, User, ArrowRight } from "@nitroicons/react";
export default function App() {
return (
<div>
<Home />
<User size={32} />
<ArrowRight strokeWidth={2.5} />
</div>
);
}Icons render as inline SVGs. They inherit the current text color by default and accept all standard SVG attributes.
Props
Every icon component accepts these props, plus all native SVG element attributes.
| Prop | Type | Default | Description |
|---|---|---|---|
| size | number | 24 | Width and height in pixels |
| strokeWidth | number | 2 | SVG stroke width |
| absoluteStrokeWidth | boolean | false | Keeps the stroke visually consistent across sizes |
| className | string | — | CSS class for styling |
| ...props | SVGProps | — | All standard SVG attributes |
Examples
// Custom size
<Home size={48} />
// Custom stroke width
<User strokeWidth={1.5} />
// Lucide-style absolute stroke width
<Home size={18} strokeWidth={2} absoluteStrokeWidth />
// Custom color via className (Tailwind)
<ArrowRight className="text-[var(--color-accent-500)]" />
// Custom color via inline style
<Home style={{ color: "#4CFF61" }} />
// Combining props
<Download size={20} strokeWidth={2.5} className="text-emerald-400" />Styling
Icons use currentColor for their stroke, so they inherit the text color from their parent element.
With Tailwind CSS
// Color
<Home className="text-[var(--color-accent-500)]" />
// Size via Tailwind (override size prop)
<Home className="w-8 h-8" />
// Hover effects
<Home className="text-gray-400 hover:text-white transition-colors" />
// Responsive
<Home className="w-5 h-5 md:w-6 md:h-6" />With inline styles
<Home style={{ color: "#4CFF61", width: 32, height: 32 }} />With CSS modules
// styles.module.css
.icon {
color: #4CFF61;
width: 24px;
height: 24px;
transition: color 0.2s;
}
.icon:hover {
color: #78FF88;
}import styles from "./styles.module.css";
import { Home } from "@nitroicons/react";
<Home className={styles.icon} />Categories
Icons are organized into the following categories. Browse them all on the icons page. The React package also exports searchable metadata via iconsMetadata, metadataByName, categories, and iconKeywords.
Contributing
Nitro Icons is open source. To add a new icon:
- Add your SVG file to
packages/core/icons/ - Add metadata to
packages/core/metadata/icons.json - Run the generator:
pnpm build:icons # generates React components
pnpm build # builds the packageSVG guidelines: use a 24x24 viewBox, stroke="currentColor", no hardcoded widths/heights, and rounded joins for consistency.
Project structure
nitro-icons/
├── packages/
│ ├── core/ # Raw SVGs + metadata
│ │ ├── icons/ # .svg files
│ │ └── metadata/ # icons.json
│ ├── react/ # Auto-generated React components
│ └── utils/ # Build utilities
├── apps/
│ └── website/ # This documentation site
└── scripts/
└── generate-icons.tsReady to use?
Browse all 337+ icons and copy code instantly.