Ad Code

How to create button in lightning component


The Salesforce lightning framework gives the capability to create custom buttons in the lightning components. In this post, we have mentioned the component code to create a custom button.

Component code:

<aura:component implements="flexipage:availableForAllPageTypes">
    <lightning:button label='custom button' variant='brand'/>
</aura:component>


add this code to your component and refresh the record page. 

Result:




If you see any issues in creating a custom button in the salesforce lightning components, add it in the comments section below. Our team is always happy to assist you.

Post a Comment

2 Comments

  1. Can we add lightning component quick actions to List View?

    ReplyDelete
    Replies
    1. As of winter'23 this option is not available for the list view

      Delete