Framer's Magic Motion
nan.fyi·7h·
Discuss: Hacker News
Flag this post

November 22, 2022

A guide on recreating framer’s magical layout animations.

My favourite part about Framer Motion by far is its magical layout animations—slap on the layout prop to any motion component, and watch as that component seamlessly transitions from one part of the page to the next:

<motion.div layout />

function

hello

left-paren

(

right-paren

)

left-curly

{

console

dot

.

log

left-paren

(

hello, world!

right-paren

)

right-curly

}

When you click on “Hide types”, the squares seamlessly move from one position to the next.

In this post, I want to dive deep into the techniques that allow these layout animations to happen. Specifically, we’ll go over concepts like:

Layout changes, what they are and when they occur; 1.

**CSS-based …

Similar Posts

Loading similar posts...