Skip to main content

I have a a text box within a frame that has a top and bottom border, like this:


image


When I add more text to the text box, I’d like the frame to expand to accommodate it, but I can’t seem to get the outer frame to change:


image


What I want to happen is for the frame to expand like this:


image


Any suggestions?


adTHANKSvance!

Hello!

The Auto Layout function can help you.

Simply apply an auto layout to your frame (Shift+A or right-click on your frame and select “Add auto layout”) then, constrain its height according to its content, by applying the “Hug contents” mode in the right-hand side menu.


image


image


For more information, take a look at the auto layout tutorial and the object resizing tutorial


I hope it’ll help you 🙂



  • Select the frame and press Shift + A to add auto layout.

  • In the auto layout settings, set the width to fixed and height to hug contents. Add padding as needed.

  • Select the text layer inside the frame and set its width to fill container.


This will make the frame expand as the text grows, but keep its width fixed as desired.


Thanks, Anais and Ravi, I’ve been able to make an expanding frame!


Follow-up question: Currently the frame I’ve made only expands in the downward direction as text is added. Is there a way to make it expand both up & down, so the frame stays centered vertically?


Reply