Using Font Awesome along Prime Icons

UI Components for React
Post Reply
mfilteau
Posts: 1
Joined: 07 Jun 2020, 23:09

07 Jun 2020, 23:17

Hi all,

Sorry if this is a newbie question. I need icons not provided in the Prime Icons set. I've found what I need in Font Awesome 4.7.0.

I've added the css reference in my index.html

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ ... me.min.css">

In App.js, when I create the side menu, I specify the icon I want:

createMenu() {
this.menu = [
{
label: 'Test',
icon: 'fa fa-puzzle',
to: '/test'
},

What am I missing?

Thanks in advance!

-Martin

mert.sincan
Posts: 4603
Joined: 29 Jun 2013, 12:38

11 Oct 2020, 01:19

Hi,

Sorry for the delayed response! Can you add a screenshot of this situation after selecting the icon item in the browser's inspector? Also, please check font-family style of this icon element.

Best regards,

cstraw
Posts: 2
Joined: 20 Oct 2020, 17:15

25 Jan 2021, 22:30

To get FontAwesome working as part of a menu, I exploded a FontAwesome download into my src folder so I had a copy of the stylesheet file.

I then pointed to it in App.js by adding:

Code: Select all

import './fontawesome-free-5.15.2-web/css/all.css';
then was able to access icons as needed through:

Code: Select all

        {
            label: "Menu Category", icon: "fa fa-users",
            items: [
                { label: "Subcategory", icon: 'fa fa-globe-americas', to: "/whereever" },
            ]
        },

mert.sincan
Posts: 4603
Joined: 29 Jun 2013, 12:38

26 Jan 2021, 10:24

Thanks a lot for the update!

Best Regards,

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests