@riovir/wc-fontawesome
TypeScript icon, indicating that this package has built-in type declarations

0.1.13 • Public • Published

@riovir/wc-fontawesome Storybook

Non-official webcomponents for Font Awesome.

The API and usage is based on vue-fontawesome.

Click and play with the components:

Click and play with the components

Installation

# Install peer dependency
$ npm i --save @fortawesome/fontawesome-svg-core
# Install the components
$ npm i --save @riovir/wc-fontawesome
# Install a Font Awesome format icon pack
$ npm i --save @fortawesome/free-solid-svg-icons

Features

Register your components first

import { FontAwesomeIcon } from '@riovir/wc-fontawesome'
customElements.define('font-awesome-icon', FontAwesomeIcon);
// Alternatively, use a shorter name
customElements.define('fa-icon', FontAwesomeIcon);

For examples see the Storybook. While the code samples use lit-html syntax, this package does not require it.

Why not self-define by default?

In the event you need to share the page with other teams using different versions of this component, you'll need some sort of scoping. You can read more about the topic on open-wc.org.

Package Sidebar

Install

npm i @riovir/wc-fontawesome

Weekly Downloads

1

Version

0.1.13

License

MIT

Unpacked Size

234 kB

Total Files

27

Last publish

Collaborators

  • riovir
  • sciurus7