How to reduce or change size of lightning:icon in aura component? - Salesforce Globe For You
solution:use the size attribute of lightning:icon to change it's size.
size="xx-small" very very small icon
size="medium" medium size icon.
Example:LightningIconSize.cmp
<aura:component >
<div class="slds-align_center" style="padding-left:100px">
very very small Icon: <lightning:icon iconName="action:delete" size="xx-small" alternativeText="Delete" title="Delete" /><br/><br/>
very small Icon: <lightning:icon iconName="action:delete" size="x-small" alternativeText="Delete" title="Delete"/><br/><br/>
small Icon: <lightning:icon iconName="action:delete" size="small" alternativeText="Delete" title="Delete" /><br/><br/>
medium Icon: <lightning:icon iconName="action:delete" size="medium" alternativeText="Delete" title="Delete" /><br/><br/>
large Icon: <lightning:icon iconName="action:delete" size="large" alternativeText="Delete" title="Delete" />
</div>
</aura:component>
TestApp.app
<aura:application extends="force:slds">
<c:LightningIconSize/>
</aura:application>
Output:
No comments:
Post a Comment