Button resizes but leaves blank gap on one side

Hi everyone, I’m stumbling across a problem that’s driving me nuts.

I’ve created components for buttons and each button contains:

  • Left icon
  • Title
  • Right icon

The layout is set to expand Horizontal, from the center.

When I use the button component, I can type anything and it’ll auto-adjust the size, I can also choose a different icon or set it as none but when I do this, I’m not sure why but it leaves an empty space on the right side of the button (not on the left side of it, strangely).

It doesn’t matter how I set the constraints nor anything, it will always behave the same way, and I cannot get rid of that extra space added at the right side, when not using the Right Icon, but both the Left and Right are set exactly the same way.

Any idea on how to get this sorted?

Try not using a group inside of the artboard and just set artboard itself to expand horizontally from center.

1 Like

Hi there. :wave:
You can simplify your Symbol quite a bit, as shown here, and it will work the way you want it to.

Thanks a lot for your suggestion! This works great :slight_smile:

1 Like