npm

riot-fa

4.6.2 • Public • Published

Font Awesome icons for Riot.js

Installation

A simple component for Font Awesome on Riot.js.

$ npm install riot-fa

Usage

<fa icon="twitter" />

That's it.

Load components

IIFE

<!doctype html>

<html>
  <head>
    <!-- Loads font separately -->
    <style>@font-face { font-family: FontAwesome; src: url('fa.woff') format('woff') }</style>
  </head>

  <body>
    <fa icon="twitter" />

    <script src="riot.js"></script>

    <!-- Loads Riot FA -->
    <script src="riot-fa.js"></script>

    <script> riot.mount('*') </script>
  </body>
</html>

Rollup / Browserify / WebPack

<!doctype html>

<html>
  <head>
    <!-- Loads font separately -->
    <style>@font-face { font-family: FontAwesome; src: url('fa.woff') format('woff') }</style>
  </head>

  <body>
    <fa icon="twitter" />

    <script src="bundle.js"></script>
  </body>
</html>
import riot from 'riot'
import 'riot-fa'

riot.mount('*')

Package Sidebar

Install

npm i riot-fa

Weekly Downloads

0

Version

4.6.2

License

MIT

Last publish

Collaborators

  • cognitom