/faicon

Font awesome react component

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Faicon

Software License

Font awesome icon is react component.

Install

With Yarn

yarn add faicon font-awesome

With npm

npm i --save faicon font-awesome

Use

After installing faicon, react, and webpack (or gulp):

import React from 'react';
import { Faicon } from 'faicon';
import 'font-awesome/css/font-awesome.css';

class App extends React.Component {
  render() {
    return (
      <Faicon name="user"/>
    );
  };
}

Attributes

  • name="user" - name of icon without "fa-" (required)
  • size="2" - size of icon without "fa-" & "x", default "lg"
  • spin or pulse - Set animate for icon
  • border
  • fixed - Set fixed size for icon
  • fh or fv - Set flip for icon
  • rotate="90"
  • inverse
  • addClass="my-cool-class"

Stack

Inversing user in square:

import React from 'react';
import { Stack } from 'faicon';
import 'font-awesome/css/font-awesome.css';

class App extends React.Component {
  render() {
    return (
      <Stack name1="user" name2="square-o" inverse1/>
    );
  };
}

Change log

Please see CHANGELOG for more information what has changed recently.

License

The Apache License Version 2.0. Please see License File for more information.