vue-icomoon
It allows you to simply view the icons in the selection.json file provided by Icomoon.
37,369
27
| Install | |
|---|---|
npm install vue-icomoon |
|
| Latest Version: | 0.6.1 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Feb 5, 2023 |
| Links: | GitHub · npm |
Maintainer: aykutkardas

📦 Zero Dependencies
It makes it very simple to use SVG icons in your Vue3 projects.
Demo - Buy Me a Coffee
Install
npm install vue-icomoon
Usage
You can use svgps.app to access over 40,000 free icons and convert your own icons into selection.json.
Or you can use IcoMoon to generate the selection.json file.
Declare
Icon.vue
<template>
<icomoon :iconSet="iconSet" v-bind="$props" />
</template>
<script>
import { Icomoon } from "vue-icomoon";
import iconSet from "./selection.json";
export default {
name: "Icon",
components: { Icomoon },
setup() {
return {
iconSet,
};
},
};
</script>
Use
<template>
<icon name="camera" :size="50" color="#5096ec" />
</template>
<script>
import Icon from "./components/Icon/Icon.vue";
export default {
components: { Icon },
};
</script>
Props List
| Name | Type | Default | Sample |
|---|---|---|---|
| iconSet | Object | undefined | "selection.json file content" |
| name | String | undefined | "home" |
| size | Number,String | undefined | "1em", 10, "100px" |
| color | String | undefined | "red", "#f00", "rgb(0,0,0)" |
| style | Object | {...} | { color: '#ff0'} |
| title | String | undefined | "Icon Title" |
| class | String | undefined | "icomoon" |
| disableFill | Boolean | undefined | true |
| removeInitialStyle | Boolean | undefined | true |
iconList
You can use the iconList method to see a complete list of icons you can use.
import { iconList } from "vue-icomoon";
import iconSet from "./selection.json";
iconList(iconSet);
// sample output
[
"document",
"camera",
"genius",
"chat",
"heart1",
"alarmclock",
"star-full",
"heart",
"play3",
"pause2",
"bin1",
];
Related Links
Related Packages
Version History
| Version | Released | License |
|---|---|---|
| 0.6.1 | MIT | |
| 0.6.0 | MIT | |
| 0.5.0 | MIT | |
| 0.4.0 | MIT | |
| 0.3.2 | MIT | |
| 0.3.1 | MIT | |
| 0.3.0 | MIT | |
| 0.2.3 | MIT | |
| 0.2.2 | MIT | |
| 0.2.1 | MIT | |
| 0.2.0 | MIT | |
| 0.1.3 | MIT | |
| 0.1.2 | MIT | |
| 0.1.1 | MIT | |
| 0.0.1 | ISC |