gluon-font-awesome
v0.1.1
Published
Font Awesome as a Web Component
Downloads
11
Readme
gluon-font-awesome
A lightweight Web Component wrapper for Font Awesome
Examples
Simple usage:
<script type="module" src="/node_modules/gluon-font-awesome/fontAwesome.js"></script>
<font-awesome icon="fas fa-camera-retro fa-7x"></font-awesome>
Easy to use in other Web Components:
import { GluonElement, html } from '/node_modules/gluonjs/gluon.js';
import '/node_modules/gluon-font-awesome/fontAwesome.js';
class MyElement extends GluonElement {
get template() {
return html`<font-awesome icon="fas fa-camera-retro"></font-awesome><span>With some text!</span>`;
}
}
customElements.define(MyElement.is, MyElement);
Installation
Gluon-font-awesome is available through npm as gluon-font-awesome
.
See rollup.config.js
and index.html
for bundling and cross-browser compatibility.
License
Copyright © 2017-present, Goffert van Gool