Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

How can you change the Lightning button’s variant by clicking the button in LWC?

Asked by Diana Campbell Aug 18, 2023 1.3K views 1 answer
Share

About this question

 I want to change the variant once I click the Lightning button. I have tried to build a JavaScript code based on that. But I cannot find any way to do that.  I am at a loss here. Can I get any suggestion as to how I can change the variant whenever I click on the Lightning button. 

JS Code: 

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.