Description
Nuxt Icons is a module for Nuxt 4 that makes it easy to use your own SVG icons. You place SVG files in an assets/icons folder, and the module collects them, overwrites their height and width so they scale, and lets you use them with a component. The component injects the SVG code directly into the page, so icons behave like fonts: you can change their color and font size instead of setting fill, width and height. Subfolders are supported, and an icon's name then follows its path inside the icons folder. Icons that carry their own definitions need the filled attribute to keep the original colors from the SVG file. The default styles on icons can be overridden with ordinary CSS. Hot module replacement means you do not need to reset the project when icons change. To install, run the Nuxi module command and add nuxt-icons to the modules in nuxt.config.ts. For icons from an online icon pack, the README suggests downloading SVGs into the icons folder or using the nuxt-icon module, which supports those packs natively. The project is open source and hosted on GitHub.…
Highlights
- Use your own SVG icons in Nuxt 4
- Icons inline and scalable
- Style icons with color and font size
- Hot module replacement for icon changes
- Subfolder support with path-based names
Ratings & Reviews
No ratings yet
Be the first to rate nuxt-icons.
People also visit
nuxt-icons FAQ
What is Nuxt Icons?
A Nuxt 4 module that lets you use your own SVG icon files in a project through a single component.
How do I install it?
Run npx nuxi@latest module add icons, then add nuxt-icons to the modules in nuxt.config.ts.
Can I use icons from an icon pack?
The README suggests downloading SVGs into the icons folder, or using the nuxt-icon module, which supports online icon packs natively.
Why does an icon keep its own colors?
Icons with their own definitions need the filled attribute to keep the original colors from the SVG file.
Do I have to restart after adding icons?
No. Hot module replacement picks up new and changed icons without resetting the project.
What are the best nuxt-icons alternatives?
Popular alternatives to nuxt-icons include oh-vue-icons, @phosphor-icons/vue and astro-iconset. See all nuxt-icons alternatives














