DEV Community

Obiwan Pelosi
Obiwan Pelosi

Posted on

πŸŽ‰ Vue-icons (a react-icons equivalent) is finally here, LFG

If you've ever used React, you've probably come across the excellent react-icons library β€” a single, tree-shakeable, well-typed icon package that just works.

But for Vue developers? The icon ecosystem has felt scattered and inconsistent... until now.

πŸ‘‰ Say hello to Vue Icons Library β€” a modern, TypeScript-first icon library designed specifically for Vue.

πŸ”— Quick Links

  • πŸ§‘β€πŸ’» Visit the Website

  • πŸ“¦ GitHub Repository

  • πŸš€ Install Now:

npm install vue-icons-lib

πŸ” What is Vue Icons Library?

Vue Icons Library is the Vue 3 equivalent of react-icons β€” a comprehensive, zero-dependency, tree-shakeable icon library that bundles 7+ popular icon sets into a single, intuitive API.

Built with modern Vue tooling, it brings performance, type safety, and simplicity to working with icons in your Vue apps.

🎯 Key Features

  • βœ… Tree-shakeable by design – Only the icons you import are included in your bundle

  • πŸ’‘ TypeScript-first – Full type definitions with IDE IntelliSense

  • 🧩 Built for Vue 3 – Composition API, script setup support, and reactivity-ready

  • ⚑ Lightweight & Fast – Clean SVGs, optimized build pipeline

  • 🧱 Consistent API – Unified props (size, color, class, etc.) across all icons

  • β™Ώ Accessible – Proper viewBox and accessible by default

  • 🌐 SSR Compatible – Works great with Nuxt, Vite SSR, etc.

🎨 Included Icon Sets

Vue Icons Library ships with thousands of icons from your favorite sets:

  • Ant Design Icons
  • Box Icons
  • Circum Icons
  • CSS.gg Icons
  • Dev Icons
  • Feather Icons

More sets (like Material Icons and Heroicons) are coming soon!

βš™οΈ Getting Started

Installation:

npm install vue-icons-lib

Basic usage:

<script setup> import { FiHeart } from 'vue-icons-lib/fi'; import { AiFillStar } from 'vue-icons-lib/ai'; import { BxHome } from 'vue-icons-lib/bx'; </script> <template> <div> <FiHeart color="#ff6b6b" size="24px" /> <AiFillStar color="#ffd700" /> <BxHome class="home-icon" /> </div> </template> 
Enter fullscreen mode Exit fullscreen mode

Advanced Example:

<script setup> import { FiHeart } from "vue-icons-lib/fi"; function handleClick() { console.log("Heart clicked!"); } </script> <template> <FiHeart size="32px" color="#ff6b6b" class="heart-icon" style="cursor: pointer; transition: transform 0.2s;" @click="handleClick" /> </template> 
Enter fullscreen mode Exit fullscreen mode

πŸš€ Real-World Usage Example:

<script setup> import { FiHeart, FiStar, FiShare, FiBookmark } from "vue-icons-lib/fi"; const props = defineProps<{ isLiked: boolean; isStarred: boolean; }>(); </script> <template> <div class="action-buttons"> <FiHeart :color="isLiked ? '#ff6b6b' : '#666'" size="20px" class="action-icon" @click="$emit('toggle-like')" /> <FiStar :color="isStarred ? '#ffd700' : '#666'" size="20px" class="action-icon" @click="$emit('toggle-star')" /> <FiShare size="20px" class="action-icon" @click="$emit('share')" /> <FiBookmark size="20px" class="action-icon" @click="$emit('bookmark')" /> </div> </template> 
Enter fullscreen mode Exit fullscreen mode

πŸ“¦ Bundle Optimization

Before (bad):

<script setup> import * as Icons from 'some-icon-library'; // 😱 All icons are bundled </script> 
Enter fullscreen mode Exit fullscreen mode

After (with Vue Icons Library):

<script setup> import { FiHeart, FiStar } from 'vue-icons-lib/fi'; // βœ… Only what you need </script> 
Enter fullscreen mode Exit fullscreen mode

Result? ⚑ Smaller bundle size and faster load times β€” especially important for production apps.

πŸ§ͺ Compatibility & Support

βœ… Vue 2 & 3.x

βœ… Vite, Webpack, Rollup

βœ… TypeScript

βœ… SSR (Nuxt.js, etc.)

βœ… Tree-shaking compatible bundlers

βœ… All modern browsers

🀝 Get Involved

Vue Icons Library is open source and welcomes contributions!

  • πŸ’¬ Submit issues or feature requests

  • πŸ›  Add more icon sets or improve performance

  • 🧾 Help refine the docs and examples

  • 🌟 Star the repo if you like the project!

GitHub β†’ github.com/vue-icons-lib

πŸ‘‰ Explore the icons and docs site here

Top comments (0)