Lightning Help Text with custom Icon in Salesforce | lightning:helptext


 In this article you will learn to apply a custom icon instead of help text's default icon in a Lightning Component.

Please checkout below code : 

Component

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
    <label class="slds-form-element__label" style="padding:10px">First Name(Normal help text)</label>
    <lightning:helptext content="Please enter your first name"/> 
    <br/>
    <label class="slds-form-element__label" style="padding:10px">Last Name(Custom Icon help text)</label>
    <lightning:helptext
        content="Please enter your last name"
        iconName="utility:salesforce1"
    />
</aura:component>


Output


 If you have any question please leave a comment below.

If you would like to add something to this post please leave a comment below.
Share this blog with your friends if you find it helpful somehow !

Thanks
Keep Coding




Post a Comment

0 Comments