1

I installed the below package from font awesome documentation and faCoffee icon was added but when I want to use the social icon the icon is not added.

npm i --save @fortawesome/fontawesome-svg-core

npm i --save @fortawesome/free-solid-svg-icons
npm i --save @fortawesome/free-regular-svg-icons

npm i --save @fortawesome/react-fontawesome@latest

<FontAwesomeIcon icon={faCoffee} />
  • Please create reproducible example [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) – Dennis Vash May 03 '22 at 15:12

1 Answers1

0

Social icons come with with pro package of FontAwesome, so you will need to upgrade in ordered to get them. I believe they come in their own package too.

However, if you chose to import your icons via the script tag rather than the react packages, you can access the icons for free like so...

<i className="fab fa-facebook" />

Script tag if you need it:

 <script src="https://your-site-or-cdn.com/fontawesome/v5.15.4/js/all.js" data-auto-a11y="true" ></script>
  • Don't use `your-site-or-cdn`, use the official install: https://fontawesome.com/v5/docs/web/use-with/wordpress/install-manually – David206 Aug 16 '22 at 06:45