function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ayan HoreAyan Hore 

How to use svg4everybody in lightning component

Hi All,

I'm trying to use svg4everybody in Lightning Component. However, I did not find any documentation on how to use it in Lightning Components. Any help would be greatly appreciated..!!

Ayan
Best Answer chosen by Ayan Hore
Ayan HoreAyan Hore
Hi All,

After some research found out that the svg4everybody() has some limitations: you cannot use action function when using svg4everybody(). So the best way to implement this is to use PNG instead. This works on both IE and rest of the browsers.
Example below:
<img class="slds-icon slds-theme--offline slds-icon--medium" src="{!$Resource.SLDS100 + '/icons/standard/related_list_120.png'}"/>

Thanks everyone for the responses, much appreciated..!!
___________________________
Cheers,
Ayan

All Answers

Ayan HoreAyan Hore
Hi Arvind,

Thanks for replying. However, do you mind explaining how this would work for displaying SVG icons in Lightning component in Internet Explorer?
ArvindyadavArvindyadav
Hi Ayan,

sorry for the reply on wrong post.
Jasveer SinghJasveer Singh
https://www.lightningdesignsystem.com/resources/lightning-svg-icon-component-helper/

use this link above
please mark best if help full for you
Thanks & Regards
Jasveer Singh
Ayan HoreAyan Hore
Hi All,

After some research found out that the svg4everybody() has some limitations: you cannot use action function when using svg4everybody(). So the best way to implement this is to use PNG instead. This works on both IE and rest of the browsers.
Example below:
<img class="slds-icon slds-theme--offline slds-icon--medium" src="{!$Resource.SLDS100 + '/icons/standard/related_list_120.png'}"/>

Thanks everyone for the responses, much appreciated..!!
___________________________
Cheers,
Ayan
This was selected as the best answer