Socket
Book a DemoInstallSign in
Socket

@gluon/font-awesome

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gluon/font-awesome

Font Awesome as a Web Component

1.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

gluon-font-awesome

NPM Latest version Code Style: prettier

A lightweight Web Component wrapper for Font Awesome

  • Supports Free and Pro icon sets
  • Uses the Font Awesome CDN
  • Supports self-hosted font-awesome assets

Examples

Basic usage

<script type="module" src="/node_modules/@gluon/font-awesome/font-awesome.js"></script>

<font-awesome icon="fas fa-camera-retro fa-7x"></font-awesome>

In other Web Components

import '/node_modules/@gluon/font-awesome/font-awesome.js';

class MyElement extends HTMLElement {
  get template() {
    return html`<p>Take a picture! <font-awesome icon="fas fa-camera-retro"></font-awesome></p>`;
  }
  // ...
}

Using font-awesome Pro

<script>window.FontAwesome = { pro: true };</script>
<script type="module" src="/node_modules/@gluon/font-awesome/font-awesome.js"></script>

<font-awesome icon="fal fa-camera-retro fa-7x"></font-awesome>

Using self-hosted assets

npm install @fortawesome/fontawesome-free
<script>window.FontAwesome = { path: '/node_modules/@fortawesome/fontawesome-free' };</script>
<script type="module" src="/node_modules/@gluon/font-awesome/font-awesome.js"></script>

<font-awesome icon="fal fa-camera-retro fa-7x"></font-awesome>

Installation

Gluon-font-awesome is available from npm as @gluon/font-awesome

npm install @gluon/font-awesome

Compatibility

Works on all modern browsers, and IE11. May require some polyfills and/or bundling. See rollup.config.js and index.html for example bundling and polyfill usage.

License

MIT

Copyright © 2017-present, Goffert van Gool

Keywords

web-components

FAQs

Package last updated on 04 Sep 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.