vue-fontawesome-css

A simple vue component for display icons with font-awesome css
2,249
Install
npm install vue-fontawesome-css
Latest Version:1.0.0
License:MIT
Last Updated:Mar 31, 2020
Links: GitHub  ·  npm
Maintainer: diegoazh

Simple vue-fontawesome-css plugin

This plugin provides simple functionality to add font awesome 5 icons in your vue components. This plugin works with fontawesome.css stylesheet not with svg javascript. Is a very simple plugin that provides this functionalityk.

Install

npm install vue-fontawesome-css [--save]

Dependencies

  • This package depends on '@fortawesome/fontawesome-free-webfonts'

Usage

  • First import and install plugin
import Vue from 'vue'
import Main from './Main.vue'
import VueFontAwesomeCss from 'vue-fontawesome-css'

Vue.use(VueFontAwesomeCss)

const app = new Vue({
  el: '#app',
  render: h => h(Main)
})
  • Second use the xml tag <fa-icon /> in your html
<fa-icon icon="user-circle" icon-id="botonProfile" other-classes="my-bg-color" />

or

<fa-icon :icon="['fab', 'youtube']" icon-id="chanelIcon" other-classes="my-personal-class" />

Props

Option Type Description Required
icon String or Array This option set the icon, it is not necesary to put 'fa-' prefix e.g. for 'fa-user' write only 'user'. The 'fa-' prefix is automaticaly added. If it is a string, the plugin assumes a 'fa' or 'fas' prefix, otherwise the first place in the array set the prefix 'fa', 'fas', 'far' or 'fab' and in the second place it sets the icon. True
icon-id String Set the id tag if you need False
other-classes String Add other classes for you icon tag, only if you needed False

Repository

https://github.com/diegoazh/vue-fontawesome-css

License

"MIT"

Related Packages

vue-fontawesome

Fontawesome component for vuejs

50,640 6
@snickbit/fa-gen

Easily generate tree-shaken Font Awesome library loader files for Vue.js

1,797
@vuecs/icons-font-awesome

Font Awesome icon preset for vuecs — maps semantic-slot defaults (pagination pre...

6,514 4
vue-captcha

Component (es6) Captcha for Vue.js

5,387 9
vue-fa

Tiny FontAwesome component for Vue.js

26,271 24

Version History

Version Released License
1.0.0 MIT