Auto layout isn't possible for a button with three elements?

Hi guys,

I have designed several buttons, each containing three elements (2x icons and a textbox or two textboxes and an icon) and somehow I can’t get the button to have…

  1. the same dimensions
  2. grows vertically when writing into the textbox
  3. the three elements are exactly in the same place

…after converting with the Auto Layout!

In addition, I get a different result for each button despite the same procedure - how can this be?

I have prepared a file with the buttons: HiDrive
I would be happy if someone could enlighten me please! :confused:

Kind regards

Sasha, here’s an example file (which you can duplicate to your drafts) that I think matches what you’re looking for: Figma

To ensure the same dimensions, I would recommend that all the numbers/icons are placed in identically sized frame containers, so that you can use the same margins. Right now the buttons I shared have different margins because the things inside each button have different heights.

Hi Nelson,

thanks for your help and sorry for the late reply!

But the problem is that I get a different result each time I apply the auto layout to each of the individual (example) buttons. And I don’t know what the reason is. If I define a frame as a container for each button before, unfortunately nothing changes. :confused:

When I apply the auto layout to the first button, the button simply changes its size (why??) and the space between the icons is also changing. Then the button should be able to “grow” vertically when a line of text is added – but it doesn’t. When I apply the auto layout to the second button any other things happen – It’s very confusing and depressing because I can’t find a cause.

Can you or anyone please here help further?

Kind regards

Ok, I got it!

First I had to understand that every element which gets an auto layout must be restored in the appearance in principle!

This is my step-by-step workflow for all those who encounter the same problem:

  1. check hierarchy of the button (frame/group + 3 child elements) and copy the button
  2. select frame or group of button » set auto layout (shift + a)
  3. drag button to original length
  4. select frame or group again » Auto layout (options) » Alignment and padding » set center and left set the original padding
  5. click text element in the middle » Resizing: Fill Container/Hug Contents
  6. select frame or group again » Auto layout (options) » reduce spacing between items (or increase if necessary) to bring text (in the middle) to original spacing


1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.