Skip to main content
Solved

How to auto resize objects below an accordion menu on prototype?

  • September 19, 2023
  • 5 replies
  • 1541 views

I’m trying to automatically resize the spacing of a footer below my accordion menu for a mobile site but have been going mad trying to figure it out.

I think it may have something to do with auto layout but I am still unsure what to do. If that’s the case, a hint in the right direction as to what to do with the objects would be AMAZING. Thank you!

Best answer by Fernando_Lins

In Figma, objects will only push and pull each other if they’re part of the same autolayout frame and one of them changes size, or rotates, or whatever that makes its bounding box change. In your case, if you want the accordion to push the footer down when one of the accordion items is open, they all need to be in the same autolayout frame, otherwise there is no way for you to tell the footer to move out of the way or to adjust according to the accordion’s height.

View original
This topic has been closed for comments

5 replies

Fernando_Lins

If the footer is in the same autolayout frame as the accordion menu and it that frame’s height is set to Hug, it should work. From what can be seen in the screenshot, you might have a frame with fixed height somewhere in your structure.


  • Author
  • 14 replies
  • September 19, 2023

Hmmm it’s not in the same auto layout frame at all. I tried that but then could figure out how to lay it out properly on the page. I’m assuming it needs to be in the same frame? Do you mean in the component itself or just on the page itself? Apologies I’m still learning a lot.


Fernando_Lins
  • New Member
  • 44 replies
  • Answer
  • September 19, 2023

In Figma, objects will only push and pull each other if they’re part of the same autolayout frame and one of them changes size, or rotates, or whatever that makes its bounding box change. In your case, if you want the accordion to push the footer down when one of the accordion items is open, they all need to be in the same autolayout frame, otherwise there is no way for you to tell the footer to move out of the way or to adjust according to the accordion’s height.


  • Author
  • 14 replies
  • September 19, 2023

Thank you so much! I just had to remake my component and now it’s working.


Question. What if the frame ends after the footer and there’s no more room for the accordion menu to open all its features? Is there a way in which the frame sizing is responsive to the menu being open or closed? Otherwise, there will be a lot of blank spacing underneath it when it’s closed. Thanks


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