Needlessly Provoking Marsupials
    Have ideas to improve npm?Join in the discussion! »

    @riovir/wc-fontawesome

    0.1.5 • Public • Published

    @riovir/wc-fontawesome Storybook

    Non-official webcomponents for Font Awesome 5.

    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 5.1+ formatted 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.

    Install

    npm i @riovir/wc-fontawesome

    DownloadsWeekly Downloads

    77

    Version

    0.1.5

    License

    MIT

    Unpacked Size

    137 kB

    Total Files

    26

    Last publish

    Collaborators

    • avatar