Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fortawesome/vue-fontawesome

Package Overview
Dependencies
Maintainers
4
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fortawesome/vue-fontawesome

Official Vue component for Font Awesome 5

  • 0.0.23-1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
211K
increased by0.44%
Maintainers
4
Weekly downloads
 
Created

What is @fortawesome/vue-fontawesome?

@fortawesome/vue-fontawesome is a Vue.js component for integrating Font Awesome icons into your Vue applications. It allows you to easily use Font Awesome icons in your Vue components, providing a wide range of icons and customization options.

What are @fortawesome/vue-fontawesome's main functionalities?

Basic Icon Usage

This feature allows you to use Font Awesome icons in your Vue components. You need to import the necessary icons and add them to the library, then use the <font-awesome-icon> component to display the icon.

<template>
  <div>
    <font-awesome-icon :icon="['fas', 'coffee']" />
  </div>
</template>

<script>
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faCoffee } from '@fortawesome/free-solid-svg-icons'

library.add(faCoffee)

export default {
  components: {
    FontAwesomeIcon
  }
}
</script>

Customizing Icon Size

This feature allows you to customize the size of the icons. You can use the `size` prop to set the size of the icon, such as `1x`, `2x`, `3x`, etc.

<template>
  <div>
    <font-awesome-icon :icon="['fas', 'coffee']" size="3x" />
  </div>
</template>

<script>
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faCoffee } from '@fortawesome/free-solid-svg-icons'

library.add(faCoffee)

export default {
  components: {
    FontAwesomeIcon
  }
}
</script>

Using Different Icon Styles

This feature allows you to use different styles of icons, such as solid, regular, and light. You need to import the icons from the respective Font Awesome packages and add them to the library.

<template>
  <div>
    <font-awesome-icon :icon="['fas', 'coffee']" />
    <font-awesome-icon :icon="['far', 'coffee']" />
    <font-awesome-icon :icon="['fal', 'coffee']" />
  </div>
</template>

<script>
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faCoffee as fasCoffee } from '@fortawesome/free-solid-svg-icons'
import { faCoffee as farCoffee } from '@fortawesome/free-regular-svg-icons'
import { faCoffee as falCoffee } from '@fortawesome/pro-light-svg-icons'

library.add(fasCoffee, farCoffee, falCoffee)

export default {
  components: {
    FontAwesomeIcon
  }
}
</script>

Other packages similar to @fortawesome/vue-fontawesome

FAQs

Package last updated on 11 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc