unplugin-icons

Import any of Iconify's 200,000+ icons as on-demand components across every major bundler and UI framework.

Tool
npm
v23.0.1
4,933stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
65/100Good
Development Activity52
Maintenance48
Community60
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
68/100Good
Architecture80
Code Quality55
Innovation75
Learning Curve60

unplugin-icons turns the entire Iconify icon universe — around 150 icon sets and 200,000+ icons, logos, and emojis — into components you can import directly by path, like ~icons/mdi/account-box. Built on the unplugin cross-bundler abstraction, it works identically across Vite, Webpack, Rollup, esbuild, and Rspack, and compiles the resolved SVG into native components for React, Vue 3, Svelte, Solid, Preact, Astro, Qwik, Marko, Ember, and plain web components.

Because resolution happens at build time through a virtual-module import, only the icons a project actually references get bundled, keeping output size proportional to real usage rather than to an entire icon font or npm dependency tree. Optional auto-install support fetches missing @iconify-json collections on demand, and a companion resolver plugs into unplugin-vue-components for auto-imported usage without explicit import statements.

What You Get

  • On-demand icon components for ~150 Iconify icon sets (200,000+ icons, logos, and emojis) resolved at import time rather than pre-bundled
  • Uniform behavior across Vite, Webpack, Rollup, esbuild, and Rspack via the shared unplugin abstraction, plus a dedicated Nuxt module
  • Native component output for 10+ UI targets — React, Vue 3, Svelte, Solid, Preact, Astro, Qwik, Marko, Ember, and web components
  • Custom icon collections and an iconCustomizer hook for adjusting size, color, or SVG attributes per icon
  • Optional auto-install of missing @iconify-json/* packages the first time an icon from that set is imported
  • An unplugin-icons/resolver integration for auto-imported icon usage with unplugin-vue-components

Common Use Cases

  • Adding a large, consistent icon set to a Vite or Nuxt app without shipping an icon font or importing every icon manually
  • Building a design system or component library that needs the same icon components available across React, Vue, and Svelte builds
  • Migrating off vite-plugin-icons or a hand-rolled SVG-to-component pipeline onto a maintained, multi-bundler solution
  • Rendering brand/tech logos (via Iconify’s logo collections) inline as styleable components instead of raster images
  • Prototyping across multiple frameworks (via the project’s 13+ example apps) while keeping icon usage syntax identical

Under The Hood

Architecture unplugin-icons is built on the unplugin package, which provides one plugin definition that targets Vite, Rollup, Webpack, esbuild, and Rspack from a single implementation (src/index.ts), with each bundler entry point (src/vite.ts, src/webpack.ts, src/rollup.ts, src/esbuild.ts, src/rspack.ts, src/nuxt.ts) a thin re-export of that shared instance. The core intercepts virtual ~icons/{collection}/{icon} paths via resolveId/loadInclude/load hooks (src/core/loader.ts: isIconPath, normalizeIconPath, resolveIconsPath), maps each request to a per-framework compiler (src/core/compilers/*.ts — vue3, jsx, svelte, solid, astro, marko, qwik, ember, web-components, raw, none), and fetches the underlying SVG lazily through @iconify/utils’ node loader. Framework detection and defaults (src/core/options.ts resolveOptions) use local-pkg to inspect installed peer packages, so most consumers need zero configuration. This centralizes icon-resolution correctness in one core module while making it straightforward to add a new output framework as an isolated compiler file.

Tech Stack Written in strict-mode TypeScript (ES2017 target) with unplugin (^2.3.11) as the cross-bundler abstraction, @iconify/utils (^3.1.0) for icon data loading and SVG customization, local-pkg for framework/package detection, @antfu/install-pkg for optional auto-install of icon-set packages, and obug for scoped debug logging. All framework-specific dependencies (Vue’s compiler-sfc, Svelte, @svgr/core, @svgx/core) are optional peer dependencies, so the package stays lean regardless of which frameworks a consumer targets. It builds with tsdown (a Rolldown-based bundler, currently in beta) driven by a custom prebuild script, tests with Vitest, lints with @antfu/eslint-config, and automates releases with bumpp plus dedicated GitHub Actions release workflows.

Code Quality The repository ships only one dedicated test file (test/idSvg.test.ts, covering SVG id-collision handling), a narrow automated surface for a project of this scope — most real-world coverage instead comes from the 13+ working example apps under examples/ (Vite+Vue3, Vite+React, Next.js, Nuxt 4, SvelteKit, Astro, and more), which exercise the plugin end-to-end per framework but aren’t wired into an automated CI test gate; the visible GitHub Actions workflows cover releases only, not test runs. TypeScript strict mode and strictNullChecks are enabled project-wide, a typecheck script exists, and the code favors small, single-purpose modules (loader.ts, options.ts, svgId.ts) with clearly typed interfaces (ResolvedIconPath, ResolvedOptions) and defensive error handling around environment detection.

API Design The primary interface is a single import-path convention (~icons/{collection}/{icon}) that works identically regardless of bundler or framework, which keeps the mental model small: install the plugin, install (or auto-install) an icon-set package, and import icons like any other component. Per-bundler setup is a one-line plugin registration (e.g. Icons({ compiler: 'vue3' })), and framework auto-detection means many consumers never need to set compiler explicitly. The tradeoff is a large README (1,200+ lines) covering framework-specific caveats — for example Next.js requiring an explicit .jsx extension on icon imports — that a newcomer has to read carefully to avoid subtle per-framework gotchas.

Used by 10 apps in this directory

Rust
53%
Other

Cap

Team Chat · Video Conferencing

21,859

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
64
Dependency
Built with
Rust53%
TypeScript43%
Updated yesterday
TypeScript
67%
MIT

Hoppscotch

Developer Tools

80,226

A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.

View details
92
Repo Health
83
Technical
66
Dependency
Built with
TypeScript67%
Vue25%
Updated yesterday
Vue
50%
GPL 3.0

IT-Tools

Developer Tools

40,498

A unified collection of 88 web-based developer utilities — from JSON formatting to subnet calculation — all self-hostable, keyboard-searchable, and offline-ready.

View details
60
Repo Health
74
Technical
63
Dependency
Built with
Vue50%
TypeScript48%
Updated 4 days ago
TypeScript
98%
MIT

Kimi Code CLI

AI Code Assistants · AI Agents · Developer Tools

7,275

A single-binary, terminal-native coding agent that reads, edits, and runs code end to end, built by Moonshot AI for Kimi models but pluggable with Anthropic, OpenAI, and Google providers too.

View details
82
Repo Health
87
Technical
67
Dependency
Built with
TypeScript98%
Updated yesterday
TypeScript
92%
Other

n8n

Automation · No Code Platforms

203,555

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
66
Dependency
Built with
TypeScript92%
Updated today
TypeScript
64%
Other

NocoDB

No Code Platforms · Databases · Low Code Platforms

64,861

Turn any SQL database into a collaborative no-code spreadsheet with automatic REST APIs and real-time views.

View details
90
Repo Health
77
Technical
62
Dependency
Built with
TypeScript64%
Vue31%
Updated 2 days ago
TypeScript
91%
MIT

open-pencil

AI Design Tools · Design Tools

8,197

An open-source design editor that reads native Figma files, ships a built-in AI assistant with 100+ design tools, and offers real-time serverless collaboration — all without giving up your files.

View details
82
Repo Health
78
Technical
69
Dependency
Built with
TypeScript91%
Updated yesterday
TypeScript
38%
AGPL 3.0

OpenObserve

Monitoring · Analytics · Devops

21,666

Open source observability platform for logs, metrics, traces, and real user monitoring — delivering 140x lower storage costs than Elasticsearch with a single binary you can run in under 2 minutes.

View details
89
Repo Health
9
Technical
71
Dependency
Built with
TypeScript38%
Rust30%
Vue18%
Updated today
JavaScript
84%
MIT

Unlighthouse

Developer Tools

4,798

An open-source CLI that scans your entire website with Google Lighthouse, using smart sampling and a modern dashboard UI to audit every page instead of one URL at a time.

View details
72
Repo Health
70
Technical
79
Dependency
Built with
JavaScript84%
TypeScript11%
Updated 3 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search