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)