Skip to main content
Hi All,

I have created a custom html button in LWC like follow:

 

<button class="custButton" data-title="Some Title" onclick={handleButtonClick}>ClickMe</button>

I wish to add a icon (like approval icon) inside this button itself.

Can anybody suggest how can we do it?
2 件の回答
  1. 2022年7月25日 10:22
    Hi Chandfra,

     

    <button class="slds-button slds-button_icon slds-button_icon-brand" title="approval">

    <svg class="slds-button__icon" aria-hidden="true">

    <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg⌗approval"></use>

    </svg>

    </button>

    Below url will help for your  solution

    https://www.lightningdesignsystem.com/components/button-icons/

     

    if you need any assistanse, Please let me know!!

    Kindly mark my solution as the best answer if it helps you.

    Thanks

    Mukesh