Bada's Coding

Bada's Coding

How to Use Font Awesome in React

Bada's photo
·Nov 17, 2022·

1 min read

Offical Document

The paths are based on desktop screens.

What Kind of Packages Are

Docs > (left bar) > APIs > (left bar) > JAVASCRIPT API > Import Icons > Package names

How to Apply in React

Docs > (left bar) > Web > Use Font Awesome with Your Preferred Syntax or Stack… > React


import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTree } from '@fortawesome/free-solid-svg-icons';

export default function App() {
  return <FontAwesomeIcon icon={faTree} />;
Share this