Add the initial
prop to a motion component to tell Framer what state you want the element to be in when the page first loads. It will animate from that state to the state you declared in the animate
prop.
Will Johnson: [0:00] If the animate prop is how we want the animation to end up, then the initial prop is how we want the animation to begin. Let's set our animation prop to y: . We want to end up at on the y-axis within the container.
[0:22] Let's add the initial prop. The initial prop takes in an object, just like the animate prop does. Let's say we want it to be y, and let's say -200 on the y-axis. Let's add this space and then save. Then we reload the page. As you see, it starts -200 degrees and comes all the way down to y of .
[0:51] Let's add something else in here. Let's say opacity because it's making a nice little moving fade. Let's say opacity: . You don't want it to be visible, initially, when the page loads. Let's animate the opacity to 1. We want it to be solid by the time the animation is finished. Then we save. As you see, it dropped down and faded in.
[1:29] A good way to remember this is, initial is how it started, and animate is how it ended.