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>
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>
๐ 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>
๐ฆ Bundle Optimization
Before (bad):
<script setup>
import * as Icons from 'some-icon-library'; // ๐ฑ All icons are bundled
</script>
After (with Vue Icons Library):
<script setup>
import { FiHeart, FiStar } from 'vue-icons-lib/fi'; // โ
Only what you need
</script>
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)