Skip to main content
Question

Change auto layout behavior at smaller size?

  • November 21, 2022
  • 1 reply
  • 342 views

WolosK

I made an accordion with auto layout so that the text fills the area as the accordion resizes, but it turns out I need the text to only be a certain maximum width. When I make the width fixed it will stay that width when the accordion is bigger, which is what I want, but the issue is when it gets narrower I still want the text to go back to filling that container. Is there any way to make this work? Or do I have to just have two different accordions for the different sizes? Here’s an example file, with one with the fill container and one with fixed width.

Figma – 10 Nov 22

1 reply

Sam_Rousseau

What are you building this for? A prototype where a user needs / will change the screen size, or for engineering handoff?

If it’s for engineering handoff, I would just create two different frames - one mobile size and one desktop size with the different accordion designs (fixed and full width).

If it’s for UR - you could try this plugin:

I haven’t used it myself, but it seems like it could work for what you are trying to do


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings