flwo / client /src /components /shared /PageTransition.jsx
moustafa7's picture
Initial commit
24727a3
Raw History Blame Contribute Delete
419 Bytes
import { motion } from 'framer-motion'
const pageVariants = {
initial: { opacity: 0, y: 10 },
animate: { opacity: 1, y: 0 },
exit: { opacity: 0, y: -10 }
}
export function PageTransition({ children }) {
return (
<motion.div
variants={pageVariants}
initial="initial"
animate="animate"
exit="exit"
transition={{ duration: 0.25 }}
>
{children}
</motion.div>
)
}