1 | initial version |
In framer-motion
, direction refers to the direction in which an animation is playing. It can be either "forward" or "backward". This property is used in the useAnimation
hook to control the animation direction based on user interactions or other conditions. For example, you can use the direction
property to start an animation from the beginning when a certain condition is met or to reverse an animation when the user interacts with an element.