How can I add a custom image to the lightning button?

322    Asked by Aalapprabhakaran in Salesforce , Asked on Apr 18, 2023

I currently had a button

You might be knowing the output of the above button that is displayed in blue colour which is because of the variant = brand

But I am trying to place a custom image( downloaded from Google and stored in a static resource) to that lightning:button. Any idea on how to place the image

Answered by David EDWARDS

You cannot add a custom image to the lightning button with a Base Component. You will have to use SLDS and HTML to accomplish the same.

   Login  
Demo: https://codepen.io/sfdc2022/pen/WNdLNoW


Your Answer

Interviews

Parent Categories