Skip to content

ava-cassiopeia/fa-icon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fa-icon Custom Element

npm version

FontAwesome Version: v4.7.0

Vanilla custom element that displays FontAwesome icons in your page.


Installation

To install, run:

npm i fa-icon-element

Then, either import the file directly with:

<script src="path/to/node_modules/fa-icon-element/src/fa-icon.js" defer></script>

or, include it in your webpack (or similar) build:

import "fa-icon-element";

Usage

Once installed, simply use with:

<fa-icon name="fa-plus"></fa-icon>

Where the name attribute is any valid FontAwesome icon name. See here for a list of icons.

Known Issues, Potential Gotchas

  • The FontAwesome font face is loaded from the FontAwesome CDN. It is currently not possible to load a local instance of the FontAwesome set. Please open an issue if you need this feature.
  • Due to a potential bug, the @font-face for FontAwesome is elevated to the global CSS scope. See this article by Rob Dodson for more information.

Legal

Font Awesome by Dave Gandy - fontawesome.io (License Info)

About

Custom Element housing FontAwesome icons

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages