We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Use Font Awesome icon on toolbar

Hi,
I'm using EJ2 ES5,
I use EJ2 Toolbar, and I have successfully changed the icon using list of EJ icons. But the list of icons is limited, and I want to use Font Awesome or something else.. How to do that?

And also I want to make the toolbar icon size bigger. How to do that?

Thank you very much.

5 Replies

HB Hareesh Balasubramanian Syncfusion Team September 13, 2019 01:29 PM UTC

Hi Oka, 

Greetings from Syncfusion Support. 

Based on your requirement we have prepared a sample, which can be viewed from the following link, 

Kindly try the above sample, if you have any concerns please revert us back for further assistance. 

Regards, 
Hareesh 



CO Copleston May 27, 2020 09:39 AM UTC

If anyone is looking for this (like I was), the best way I have found to use Font Awesome / Pro is to ensure the correct styles are used by adding this CSS somewhere:

// Support Font Awesome icons (https://fontawesome.com) in e-icons
.fa,
.fas {
font-family: 'Font Awesome 5 Pro' !important;
font-weight: 900 !important;
}
.far {
font-family: 'Font Awesome 5 Pro' !important;
font-weight: 400 !important;
}
.fal {
font-family: 'Font Awesome 5 Pro' !important;
font-weight: 300 !important;
}
.fad {
position: relative;
font-family: 'Font Awesome 5 Duotone' !important;
font-weight: 900 !important;
}
.fab {
font-family: 'Font Awesome 5 Brands' !important;
font-weight: 400 !important;
}

Now you can add toolbar items with Font Awesome / Pro icons like this...

     [
'Add',
'Edit',
'Delete',
{ text: 'Refresh', tooltipText: 'Refresh the data', prefixIcon: 'fad fa-sync-alt' }
]

I hope it helps someone.


HB Hareesh Balasubramanian Syncfusion Team May 28, 2020 08:36 AM UTC

Hi Copleston, 

Thanks for your solution😊. It may really help someone who using Font Awesome icons. 

Regards, 
Hareesh 



OS Oka Sugandi May 28, 2020 09:32 AM UTC

Hi Copleston,
Thank you very much for the simple solution!

Regards,
Oka Sugandi.


VM Vengatesh Maniraj Syncfusion Team replied to Oka Sugandi May 28, 2020 09:36 AM UTC

Hi Copleston,
Thank you very much for the simple solution!

Regards,
Oka Sugandi.

Hi Oka,

Please get in touch with us if you need any further assistance.

Regards,
Vengatesh

Loader.
Up arrow icon