Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using an icon uploaded to a kit with fontawesome-react

I have a React project that uses FontAwesome v6 via the react-fontawesome package. We have a pro licence.

From package.json

    "@fortawesome/fontawesome-pro": "^6.1.1",
    "@fortawesome/fontawesome-svg-core": "^6.1.1",
    "@fortawesome/free-brands-svg-icons": "^6.1.1",
    "@fortawesome/free-regular-svg-icons": "^6.1.1",
    "@fortawesome/pro-regular-svg-icons": "^6.1.1",
    "@fortawesome/pro-solid-svg-icons": "^6.1.1",
    "@fortawesome/react-fontawesome": "^0.1.18",

And then later we import icons like so:

import {
    faAlignCenter,
} from '@fortawesome/pro-solid-svg-icons';

Fairly simple stuff.

What I can't find a way to do is use custom icons uploaded to a kit on FA. All the instructions on how to use kits are assuming you're importing via a <script> tag, there's no mention anywhere I've been able to find of doing it via the react component. Is it even possible? It must be, right?

like image 508
Lazar Avatar asked Sep 20 '25 16:09

Lazar


1 Answers

It can't be done. I reached out to FA, this is what they said:

Right now, custom icons can only be used in pro kits and kits cannot be used in React. We are looking into supporting more ways to use kits in the future.

like image 53
Lazar Avatar answered Sep 22 '25 23:09

Lazar