Here is the code of my html file in LWC:

    <lightning-button label="Update" onclick={connectedCallback} class="slds-button_icon">
        <svg class="slds-button__icon" aria-hidden="true">
            <use xlink:href="/assets/icons/utility-sync/svg/symbols.svg#sync"></use>

Why a button with a label, and not an icon?

1 Answer 1


Just use icon-name to specify an icon:

<lightning-button icon-name="utility:sync" ...>

See this demo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.