Socket
Book a DemoInstallSign in
Socket

@floatwork/fontawesome-svg-loader

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@floatwork/fontawesome-svg-loader

Loads Font Awesome SVG icons and inlines them in place of the default markup

Source
npmnpm
Version
0.3.0
Version published
Maintainers
2
Created
Source

fontawesome-svg-loader

npm npm CircleCI

Loads Font Awesome SVG icons and inlines them in place of the default markup

Installation

npm install @floatwork/fontawesome-svg-loader -S

Usage

Include script and stylesheet in your website

<!-- Fallback when JavaScript is not available -->
<noscript>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css" />
</noscript>

<!-- Loader script -->
<script src="https://cdn.jsdelivr.net/npm/@floatwork/fontawesome-svg-loader@latest/dist/fontawesome-svg-loader.js" charset="utf-8" defer></script>

Use the Font Awesome markup like you usually would, the library will take care of the rest

<i class="fas fa-feather-alt"></i>

Options

options.url

Type: string

Provide URL to the SVGs folder of Font Awesome v5. Defaults to jsDelivr.

options.fetch

Type: object

Options for fetch(), see MDN for details. Defaults to {cache: 'force-cache'}

License

This work is licensed under The MIT License

Keywords

fontawesome

FAQs

Package last updated on 27 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts