wc-fontawesome-free
Font Awesome Free icons as Web Components
Why?
- Simple to use
- Import only what you need
- Tree shakable
- Shadow DOM encapsulated
- 1,588 awesome free icons
Install
npm i wc-fontawesome-free construct-style-sheets-polyfill
Use
- Look up a free icon
- Import using the following format
<style-prefix>-<icon-name>-icon.js
- Add the custom element tag using the format
<style-prefix>-<icon-name>-icon
Where <style-prefix>
is fab
(brands), far
(regular), or fas
(solid)
Supports Font Awesome Styling via classes. For example, sizing, rotation, and animation.
You can change icon colors using the fill property in CSS.