Framer motion staggerchildren

broken image
broken image

You will need to make some changes in your code: I tried adding in exitBeforeEnter props but it doesn’t work. Looks like it is being removed from the DOM without any consideration to AnimateSharedLayout or AnimatePresence. Clicking on an accordion header, the content is abruptly hidden. But struggles to animate the exit prop on page change. You can see that it works fine to animate the in transition.

Shortened code for one accordion header: Īnd I'm trying to get framer-motion to animate between the accordion pages. So I've got this accordion-layout working with react-router-dom using a rather unconventional markup structure.

broken image