Skip to content

cognitom/riot-fa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Font Awesome icons for Riot.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published