A lightweight Web Component wrapper for Font Awesome
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);
Gluon-font-awesome is available through npm as gluon-font-awesome
.
See rollup.config.js
and index.html
for bundling and cross-browser compatibility.
Copyright © 2017-present, Goffert van Gool