This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Joost van der Ree
Posted Aug 02 - Read on Facebook

is there an easy way (preferably in Design) to make layers automatically adapt based on size or position of other layers?

see example in video: here the body's position and the container's size responds to the title's height, so when I'm testing it on different screen sizes or languages it doesn't break.

2 Comments

Jonas Treub

Unfortunately its not possible to change text styles dynamically. A quick hack would be to use scale:
text.originX = 0
text.originY = 0
text.scale = Screen.width / 375

Jonas Treub

Another option. By separating the title and body text into two different text layers you can do the following in code:

ratio = Screen.width / 375
verticalSpace = text.y - title.maxY

title.fontSize *= ratio
text.fontSize *= ratio

text.y = title.maxY + verticalSpace

Read the entire post on Facebook