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

What is Framer? Join the Community
Return to index
Jordan Robert Dobson
Posted Jan 26 - Read on Facebook

Framer Layer Alignment with minX/Y midX/Y maxX/Y

I've seen a few people lately ask about alignment of layers. I highly recommend reviewing these properties and getting to know them better. They greatly reduce the amount of math you have to do in layout and in your states.

Start here:

You can use them when you create your layer too. So, if you wanted to create a layer and place it on the bottom right hand side of the screen you'd do this:

myLayer = new Layer
 maxX: Screen.width
 maxY: Screen.height

Hope this helps you in your prototypes!


Andrew Nalband

Great visual, Jordan Robert Dobson!

Jordan Robert Dobson

Want to align the center of one layer to the center of another layer?

layer2.midX = layer1.midX
layer2.midY = layer1.midY

Danni Priscilla Hu

This is really helpful! Thanks Jordan!

Nikolay Berezovskiy

Mr Dobson save the world again with just a one line of code)

Koen Bok

Benjamin we should add a graphic like this to the docs somewhere.

Stefan Hvlmnns

great tool!

Read the entire post on Facebook