This is the code.

 <lightning-button-icon style="size:50px" icon-name="utility:settings" variant="bare" alternative-text="Settings"
icon-class="slds-m-around_medium ">

Want to increase lwc icon size in in specific pixels. so what i did is added style="size:50px" this is not worked for me.

  • 3
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Apr 22 at 16:11

2 Answers 2


Generally, you'd use the size attribute but if you want it bigger or smaller then using the zoom CSS property is your next best option

 <lightning-icon icon-name="utility:travel_and_places" style="zoom: 400%"></lightning-icon>

<lightning-icon icon-name="utility:travel_and_places" style="zoom: 35%"></lightning-icon>
  • thanks Asheer...zoom CSS property worked fine...thanks for answering the question. May 15 at 11:59

Have a look at the documentation, you have an attribute size with different sizing.

  • yes, but if I want to give a specific size like 50px, 120px then? May 13 at 4:28

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.