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

What is Framer? Join the Community
Return to index
Joseph Brick
Posted Feb 12 - Read on Facebook

I searched this group for a good way to sense when screen orientation changes between portrait and landscape (assuming a mobile environment). I found some good solutions, but these were older posts.

It turns out that now, Screen.onResize is an actual event, though it hasn't made the docs. (I think this went in last year at some point.)

So on that event, you just check whether Screen.width is greater or less than Screen.height to figure out which orientation is active. Works perfectly in Framer and on the device.


Jordan Robert Dobson

Yeah that should be added to the docs Koen / Jonas / Benjamin Den Boer

Niels van Hoorn

Thanks! I'll add it to our list of undocumented API!

Read the entire post on Facebook