What is the difference between yoyo and repeat in framer-motion

Viewed 2051

I found out that yoyo and repeat are quite identical in framer-motion. I can't find any documentation on yoyo. Only repeat is documented.

transition:{{yoyo:3}}
transition:{{repeat:3}}

Basically they do animation loop. I only notice the animation loop is slightly different in other details that I can't name.

Can anyone show me the link to yoyo documentation or give me some ideas of their difference or similarity?

1 Answers

I think yoyo is now called reverse, and reverse is a type of repeatType

repeatType can be loop (default), mirror or reverse (yoyo previously).

See that example on Codesandbox, tweak repeatType to see the difference

Related