The Salesforce lightning component design framework provides animated icons with different states that we can use in our lightning component.
“lightning:dynamicIcon” displays the dynamic icons that represent an event that’s in progress.
Here are some examples:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component> | |
<lightning:dynamicIcon type="ellie" alternativeText="Ellie image"/> | |
</aura:component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component> | |
<lightning:dynamicIcon type="eq" option="play" alternativeText="chart loding in progress"/> | |
</aura:component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component> | |
<lightning:dynamicIcon type="strength" option="2" alternativeText="Strength"/> | |
</aura:component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component> | |
<lightning:dynamicIcon type="waffle" alternativeText="Application launcher"/> | |
</aura:component> |
Attributes:
https://gist.github.com/arun12209/79c02d764b08592c03421cb7ea1ef769.js
References:
- https://www.lightningdesignsystem.com/components/dynamic-icons/#Score
- https://developer.salesforce.com/docs/component-library/bundle/lightning:dynamicIcon/documentation
Thanks
Arun Kumar