How to use Font Awesome icons in React?

The below steps followed to include Font Awesome in React:

  1. Install font-awesome:

    $ npm install --save font-awesome
  2. Import font-awesome in your index.js file:

    import 'font-awesome/css/font-awesome.min.css';
  3. Add Font Awesome classes in className:

    render() {
    return <div><i className={'fa fa-spinner'} /></div>
    }

Author of content
Edit this page

Made by Michael Sakhniuk

Twitter