Iconmate ๐
Your new favorite way to manage icons for your Vite, NextJS projects without icon libraries!
Based on my blog post on Why you might not need an icon library. Built with ๐ฆ Rust, โก๏ธ designed for speed, ๐ฆ made for developers who hate icon library bloat.
Stop installing bloated icon libraries. All you need is icones.js.org or your designer's Figma icon pack and paste them into your project with surgical precision.
What Makes It Special โจ
- Zero Dependencies ๐ฆ: Just a CLI, No icon libraries to bundle
- Framework Native ๐งฉ: Works with React, Vue, Svelte, Solid - generates components automatically
- Interactive Mode ๐ฎ: Just run
iconmateand let it guide you - URL Support ๐: Fetch from any SVG URL, not just iconify
- Raw SVG ๐: Copy-paste SVG code directly
- Empty SVG ๐๏ธ: Create placeholder icons for rapid prototyping
Quick Start
# Install
# Run inside your project ๐
> ๐ ) # Enter
> โจ > ๐ > ๐
โจ That's it. Interactive mode guides you through adding icons to your project!
// ๐ Then, you can just easily use any icon on your project like this!
import { IconHeart } from "@/assets/icons";
function MyApp() {
return <IconHeart />;
}
You can also add sensible defaults by passing flags:
Installation
NPM ๐ฆ
# or
# or
For one-off usage:
# or
# or
[!NOTE] Note for Bun users: Bun doesn't run
postinstallscripts by default which is needed to install the iconmate binary. Add"trustedDependencies": ["iconmate"]to yourpackage.jsonto do it! But you're only limited to running it with a package.json.Recommended: Just install it globally or use pnpm
Install from Cargo ๐ฆ
Or clone and install from source:
Framework Presets
| Preset | File Type | Framework |
|---|---|---|
normal |
.svg |
Vanilla HTML/CSS |
react |
.tsx |
React Components |
svelte |
.svelte |
Svelte Components |
solid |
.tsx |
Solid Components |
vue |
.vue |
Vue Components |
emptysvg |
.svg |
Placeholder |
[!IMPORTANT] If you want to use
.svgfile types, make sure to setup svgr. I covered how to do this in:
- SolidJS (Vite)
- React (Vite)
- React (NextJS)
- Vue - (contribute here)
- Svelte - couldn't find an svgr integration.
Command Line
Interactive Mode (Recommended)
# Description of each prompt:
> ๐ ) # where your icons will be saved.
> โจ
> ๐
> ๐
> ๐
Add Specific Icon
With URL
Raw SVG Content
Custom Export Template
Package.json Scripts
Best practice: Add sensible defaults to your script runner.
"scripts": {
// Usage: npm run iconmate
"iconmate": "iconmate --folder src/assets/icons/"
// Usage: npm run iconmate-react
"iconmate-react": "iconmate --folder ./src/assets/icons/ --preset react",
// Usage: npm run iconmate-empty
"iconmate-empty": "iconmate --folder ./src/assets/icons/ --preset emptysvg",
}
Supported Platforms
- macOS (Intel & Apple Silicon) ๐
- Linux (x64 & ARM64) ๐ง
- Windows (x64) ๐ช
How It Works
- Find your icon: Visit https://icones.js.org.
- Copy the name: Like
heroicons:heart. - Run iconmate:
iconmate
![]()
Why this structure?
- Copy-paste workflow: Find icon on icones.js.org โ copy name โ paste into iconmate
- Organized by default: Everything goes into
index.tsexports automatically - TypeScript ready: Generated code is fully typed
- Git-friendly: Plain SVG files, no binary assets
- Lightning fast: Native Rust binary, no Node.js startup time
Contributing
Contributions are welcomeโpull requests for bug fixes, new framework presets, or improvements are appreciated.
๐ฑ Repo: github.com/Blankeos/iconmate - Star it if you love it โญ
What's Completed from the Roadmap
โ Interactive prompt mode โ Framework presets (React, Vue, Svelte, Solid) โ URL and raw SVG support โ Custom export templates โ Zero-config installation
Original Future Plans
- An empty command. Creates an .svg, adds it to the index.ts with a name you can specify.
- Paste an actual svg instead of an icon
name. - Just a
--preset=svg,react,solid,svelte,vue- which basically overrides templates. Default issvg. - Prompt Mode via
iconmate- Interactive mode so you won't need to pass arguments. - Other frameworks (i.e. --preset=flutter) or Go, Rust, GUI apps (Not sure how they work yet).
-
Zed or VSCode Extension(seems unnecessary now, it's just a CLI)
Made with Rust ๐ฆ | Based on my blog post