Hacking the Button in Sketch

How to make a reusable button symbol with icons.

tl;dr: There are working Sketch files for you at the bottom of the article. Go ahead and use it! Make sure you have Sketch v46 or above.

I love Sketch. Coming from the old days of Photoshop, Fireworks it truly has transformed the way I and many other designers work.

I was very excited about the recent updates from Sketch, which included nested symbols, symbol overrides, and resizing options. All these features combined together made my life so much easier. And yet there are some cases when I wish it could do more!

In my case, I wanted to create a button with a label and an icon. Of course, it had to be a Symbol with overrides. I wanted to be able to duplicate this button and override both icon and the label, keeping everything together in the center of the button.

First I managed to achieve this with the icon on the right side of the label.

Editing Symbol text from the Overrides section

Structure and settings of the symbol. Don’t forget to set the text alignment to center!

Now this made me wonder if I can do the same but with the icon on the left side. It should be easy enough, but not so fast.

When you change the text, the expanding of the label only affects the item on the right side for some reason.

So the results were discouraging and I almost gave up.