Lightning:icon not lightning:button with iconName attribute is not displaying

755    Asked by CarolynBuckland in Salesforce , Asked on Jul 23, 2021

Tried in all browsers (IE, Chrome, Firefox) - but the icon is not displayed and I'm getting the following error message in the console: Unknown token "lightning.utilitySprite" default value was used instead. This is the code I'm using:


Answered by Celina Lagunas

If you are running the component in a standalone app (i.e customAppName.app), then you need to add extends="force:slds" to your custom aura:application only then the lightning icon will be displayed. Eg:

  
If the component runs inside LEX/SF1, it will work fine.

Your Answer

Interviews

Parent Categories