framer-motion exit affter few seconds

1k Views Asked by At

I want to fade in div slightly from right and after few seconds fadeout this div

in gsap this code looks like this

    tl.fromTo(message,
      {duration: 0.5, x: "70", opacity: 0},
      {duration: 0.5, x: "0", opacity: 1},
    ).to(message, {duration: 0.5, delay: 2.5, x: "0", opacity: 0});

how to do it in framer motion?

0

There are 0 best solutions below