shoelace-fontawesome-pug

6.4.3 • Public • Published

shoelace-fontawesome-pug

NPMCBT badge

A Pug mixin to make it easier to load Font Awesome Pro icons with Shoelace.

Usage

  1. Install with NPM: npm i shoelace-fontawesome-pug
  2. Anywhere in your Pug file, include this line:
    include ../node_modules/shoelace-fontawesome-pug/sl-fa-mixin.pug
  3. When using a Shoelace Icon in Pug, ensure to set the correct library:
    sl-icon(library='fa' name='fab-github')

What is this doing?

This mixin really just wraps the code recommended by Shoelace with a preset CDN for Font Awesome 6.4.0 icons.

How do I define icon styles?

Each icon style is determined with a simple prefix. In the example above, fab-github uses the fab prefix, indicating Font Awesome Brands. The other prefixes follow the same convention:

Prefix Style
fas- Solid
far- Regular
fal- Light
fat- Thin
fad- Duotone
fab- Brands
fass- Sharp Solid
fasr- Sharp Regular
fasl- Sharp Light

Package Sidebar

Install

npm i shoelace-fontawesome-pug

Weekly Downloads

1

Version

6.4.3

License

ISC

Unpacked Size

4.61 kB

Total Files

5

Last publish

Collaborators

  • tycrek