@fullcrew/icon
Material Design SVG Icons for Vue.js
Installation
# with npm
npm i @fullcrew/icon -S
# with yarn
yarn @fullcrew/icon -S
Usage
@vue/cli
// src/main.js
import Vue from 'vue'
import Icon from '@fullcrew/icon'
Vue.use(Icon)
nuxt.js
// plugins/icons.js
import Vue from 'vue'
import Icon from '@fullcrew/icon'
Vue.use(Icon)
// nuxt.config.js
export default {
plugins: [
'~/plugins/icons'
]
}
~/components/my-component.vue
<template>
<Icon name="mdiGithub" color="primary" size="medium" :rotate="45"/>
</template>
Props
| Prop | PropTypes | Details |
|---|---|---|
| name | string | For example: mdiTwitter |
| size | string | medium, small, large |
| color | string | primary, danger, success |
| rotate | number | 45, 90, 180 |
Note: Additional props will be applied to the
<svg>element.
Styling
Applying a color, size and rotate attribute is usually the easiest solution. The example below demonstrates using SCSS to style the icons.
Example see style.scss
// For example <Icon name="mdiTwitter" color="twitter">
.icon.twitter {
fill: #4099FF;
}
// For example <Icon name="mdiTwitter" size="big">
.icon.big {
width: 1.5rem;
}
// For example <Icon name="mdiTwitter" :rotate="135">
.icon.rotate-18 {
transform: rotate(135deg);
}
Related Packages
@iconoir/vue
Vue library for Iconoir, the biggest open source icon library with tons of free...
56,973
4,600
Version History
| Version | Released | License |
|---|---|---|
| 0.0.11 | MIT | |
| 0.0.10 | MIT | |
| 0.0.9 | MIT | |
| 0.0.8 | MIT | |
| 0.0.7 | MIT | |
| 0.0.6 | MIT | |
| 0.0.5 | MIT | |
| 0.0.4 | MIT | |
| 0.0.3 | MIT | |
| 0.0.2 | MIT | |
| 0.0.1 | MIT | |
| 0.0.0 | MIT |