riot-fa
v4.6.2
Published
Font Awesome icons as Riot components
Downloads
4
Maintainers
Readme
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('*')