@epferrari/react-fa-icon

A simple fontawesome icon component

Usage no npm install needed!

<script type="module">
  import epferrariReactFaIcon from 'https://cdn.skypack.dev/@epferrari/react-fa-icon';
</script>

README

react-fa-icon

Font Awesome Icon component for React

install

npm install @epferrari/react-fa-icon --save

note Don't forget to install the font awesome package itself, and include its css or less in your app somewhere

npm install font-awesome --save

usage

ES6/ES2015

import FontIcon from "@epferrari/react-fa-icon";

<FontIcon icon="bluetooth"/> <FontIcon icon="spinner" spin/>

CommonJS

var FontIcon = require("@epferrari/react-fa-icon");

props

prop type
icon string the name of the icon to render. Same as the class name you would use with an <i> tag, but does not need to be prefaced by "fa-"
size string | int accepts one of the following "lg", 2, 3, 4, 5
right boolean pull the icon to align right
left boolean pull the icon to align left
flip boolean invert the icon across the x-axis
mirror boolean invert the icon across the y-axis
rotate int accepts one of the following 90, 180, 270
fixed boolean creates a fixed width icon
spin boolean animate the icon spinning
border boolean render a border around the icon