0

Let's say I have a markup

  <span class="slds-icon_container slds-icon--small slds-icon-utility-edit">
    <img src="{!URLFOR($Asset.SLDS, 'assets/images/profile_avatar_96.png')}" />
 </span>   

how can I find path for icon-utility-edit in this case?

5
  • Didn't understand your question? Can you explain it differently!!
    – Mohit K
    Dec 3, 2019 at 12:01
  • Surely I can. So I want know file name for slds/utility/edit icon. In my case 'assets/images/profile_avatar_96.png' provides me profile icon. I want "edit" from slds. Now it's more cleared? Moreover I want know where I can find file names' for all available slds incons
    – pincet
    Dec 3, 2019 at 12:35
  • Means you want to use slds icons instead of using your own png image/icon? Is that correct? And you want a library where names of all slds icons are written?
    – Mohit K
    Dec 3, 2019 at 12:38
  • Exactly! I want to use standart slds icons and want to know from where can I get all file names for standart slds icons
    – pincet
    Dec 3, 2019 at 13:06
  • Upvote & select as best answer if my answer has helped you. Thanks
    – Mohit K
    Dec 3, 2019 at 13:15

1 Answer 1

0

No need to add lightning CSS as static resource.

Just include this tag on top of your VF page: <apex:slds />.

Pass the icon reference directly as shown below:

/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#opportunity

Example:

<use xmlns:xlink="http://www.w3.org/1999/xlink" 
    xlink:href="/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#opportunity">
</use>

Refer this Lightning Icons in Visualforce Page Link. This will help you.

5
  • Can I really use lightning namespace in apex:page?
    – pincet
    Dec 3, 2019 at 13:49
  • We are talking about "pure visual force" without aura namespace (as You could know from my message tags)
    – pincet
    Dec 3, 2019 at 13:51
  • @pincet Ohhh, you should highlight that first in question. I will check something regarding VF page. What i shared works definitely for Lightning page
    – Mohit K
    Dec 3, 2019 at 13:53
  • My apologies, but it is all about pure VF
    – pincet
    Dec 3, 2019 at 14:00
  • @pincet Check the updated answer
    – Mohit K
    Dec 3, 2019 at 14:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .