Member-only story

How to auto-resize background to my text layer

David Lindgren
4 min readAug 26, 2021

--

Let’s say you have two rows of text in a box, and you want the size of the box to automatically change to the longest text. So, how do we achieve this?

How to auto-resize background to the longest text

First, you create two text layers and one shape layer and place them in the same order as you can see in this video.

Then, we are going to separate the size values to make it easier for us to adjust them individually later on.

🎞 Watch the tutorial here!

In order for me to make it easier to understand what’s going on, I’m going to use a metaphor here and pretend that this composition is a school class trying to achieve something together.
Let’s call this class 6B.

First, we are going to add 2 new students/effects by going to “Effects controls” and search for “Slider control”. Let’s name them Justin and Kelsey. They both have arms/sliders they can use to do things with.

Now, we want to give them a task each. We want Justin to control the width of the classroom/shape and Kelsey to control the height of the classroom/shape.

The way we assign them these tasks is by going to the task itself (which is the size property) and we hold down opt/alt while clicking on the stopwatch next to “size”.

--

--

No responses yet