Skip to main content
Cody_Porter
New Member
Jan 22, 2021 7:19 PM UTC

LAUNCHED: Min and Max Width for Auto Layout

I would like to add a max-width to a text box while using auto layout to keep the word count per line at a reasonable minimum.

Currently, I have the text element set to “Fill Container” which makes the text respond very nicely to the screen size. But because it is set to “Fill Container”, the text spans the entire width of the element which makes the text lines more difficult for users to read quickly.

If a max-width was set, the component should respond until it reaches the max-width, which would help keep the line length down.

I also feel like there are many other circumstances where max and min-width would be extremely helpful

Anyone else having this issue? Or does anyone have a great fix/hack to get around it?

Looking forward to seeing what you have to say.

Cheers,

95 replies

Alex_Wright
Mar 24, 2022 5:03 PM UTC

Yes That’s my exact use case for why I need it, too!

Oluwadamilare
Apr 27, 2022 11:24 AM UTC

I am still having trouble with setting min-width for buttons. The option of including an hidden line works but doesn’t work when I include an icon. Who can help?

Vincent21
Apr 27, 2022 3:24 PM UTC

I am still having trouble with setting min-width for buttons. The option of including an hidden line works but doesn’t work when I include an icon. Who can help?

Remy1
May 20, 2022 10:02 AM UTC

+1 how to use auto-layout without max-width?

Daniel_Lewandowski1
Jun 9, 2022 12:51 PM UTC

+!,000,000 PLEASE! This is a critical feature and hope it’ll be added soon.

Michael_Vogl
Jun 15, 2022 2:42 PM UTC

It appears this workaround does not work anymore… I, like others can still resize beyond the min size limit. Even in the demo files.

Camila_Grizio
Jun 17, 2022 3:16 PM UTC

What I do to define max-widths is create a component for the element (e.g., a container with text inside). In the component, I define a fixed width (e.g. 1100px), which will play as my max-width.
Then, I use instances of that component in the screen I’m working on and, depending on the frame size I’m using, I switch from “fixed width” (it will have the same width as the one I set in the component, which would be the max-width) to “fill container” (for frames that have a smaller size than the max-width).

Katherine_Hajer
Jul 12, 2022 1:36 PM UTC

I need to have buttons expand (and reduce padding to a certain minimum) if their label is longer than usual, but if the label is shorter than usual, they need to retain a certain minimum width (all while keeping the label centred).

I’ve tried a bunch of different ways to do this, and none of them are working. It’s a big concern because I don’t want the team members to keep fussing with Auto-Layout settings (the whole idea is to make this easy for everyone, not harder).

+1 for this feature, all the way.

Stuart_Tett
Aug 2, 2022 4:22 AM UTC

Another +1 for this feature. IMO a big missing part of auto-layout. For now I think I’ll just use another variant for the max-width

Christian_Heydt
Aug 10, 2022 11:20 AM UTC

+1
This would be a very handy feature.