A Pug mixin to make it easier to load Font Awesome Pro icons with Shoelace.
- Install with NPM:
npm i shoelace-fontawesome-pug
- Anywhere in your Pug file, include this line:
include ../node_modules/shoelace-fontawesome-pug/sl-fa-mixin.pug
- When using a Shoelace Icon in Pug, ensure to set the correct library:
sl-icon(library='fa' name='fab-github')
This mixin really just wraps the code recommended by Shoelace with a preset CDN for Font Awesome 6.4.0 icons.
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 |