0.0.11 • Published 5 years ago

@fullcrew/icon v0.0.11

Weekly downloads
25
License
MIT
Repository
github
Last release
5 years ago

Material Design SVG Icons for Vue.js

npm npm npm bundle size license

View the Demo

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

PropPropTypesDetails
namestringFor example: mdiTwitter
sizestringmedium, small, large
colorstringprimary, danger, success
rotatenumber45, 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);
}
0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.5

5 years ago

0.0.6

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago