🍺 Material Icon for Vue lovers. Coded by Bootcatch.
Using NPM:
npm i vue-materials-icon --save
npm i material-icons --save
Import it in your main file e.g main.js
import Vue from 'vue'
//import material-icon scss
import 'material-icons/iconfont/material-icons.css';
//defined as global component
Vue.component('V-MaterialIcon', require('vue-materials-icon/MaterialIcon').default);
new Vue({
render: h => h(App),
}).$mount('#app')
Use wherever in your template..
<V-MaterialIcon icon="android" size="4" color="orange"></V-MaterialIcon>
- Add only name to icon, e.g
icon="android"
- icon - Material Icon name will find here material icons
- size - Icon size in
rem
. - color - You can give any valid value
e.g red, yellow, #fffff, #ff0000.
Ajay Marathe
Copyright 2019 Ajay Marathe. Code released under the MIT license.