Skip to main content
Question

Resize frame to left when component size changes


Dean_Clark

I’m fairly new to Figma, seems like this ought to be easy but so far I’m stumped.
I want a frame to grow/shrink to the left when the size of once of its right-aligned components changes. Here’s an example:

When the green box changes size, the red boxes move left / right to maintain spacing. The red and blue boxes are fixed size, and the whole thing is right-aligned in another frame.

Thanks!

3 replies

ntfromchicago

One technique that makes this possible is the layer reversal as described in this community file: https://www.figma.com/community/file/827362981795948391/Auto-Layout-Layer-Reversal

The example shows a vertical implementation but you can make it horizontal. By using this technique, the frame will resize to the left instead of right.


rjoon
  • 2 replies
  • September 1, 2022

This is a retired hack, Need a better solution. confused about constraint properties


ntfromchicago

Just place the inner frame (the one with the black border in the picture) inside another frame and pin it to the right.


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