4.6.2 • Published 8 years ago

riot-fa v4.6.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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('*')