31
Vue Unicons for developers
source link: https://www.tuicool.com/articles/hit/mUvqAr2
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
1000+ Pixel-perfect svg unicons for your next project as Vue components
Demo
https://antonreshetov.github.io/vue-unicons
Developed with love for developers
A simple way to add the necessary icons and install them.
Install
NPM
Installing with npm is recommended and it works seamlessly with webpack.
npm i vue-unicons
Download
You can download latest version from the Github: Download
Quick start
Global
To use in your project:
- Import vue-unicons
- Grab the icons you want and add then into Unicon library
- Install Unicon into Vue
main.js
import Vue from 'vue' import App from './App.vue' import Unicon from 'vue-unicons' import { uniConstructor, uniCarWash } from 'vue-unicons/src/icons' Unicon.add([uniConstructor, uniCarWash]) Vue.use(Unicon) new Vue({ render: h => h(App) }).$mount('#app')
App.vue
<template> <unicon name="constructor" fill="royalblue"></unicon> <unicon name="car-wash" fill="limegreen"></unicon> </template>
Props
Name Description Type Accepted valuesname
Icon name
string
-
width
Width of icon
string
-
height
Height of icon
string
-
fill
Fill color of icon
string
HEX or color name
Events
Name Description Payloadclick
Triggered when icon was clicked
-
License
Vue Unicons licensed under MIT.
Unicons licensed under Apache 2.0
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK