Files
kentekengen/src_frontend_orig/components/PageTransition.jsx
2026-03-01 13:23:49 +00:00

16 lines
430 B
JavaScript

import { motion, useReducedMotion } from 'framer-motion';
export function PageTransition({ children }) {
const reduce = useReducedMotion();
return (
<motion.div
initial={reduce ? { opacity: 1 } : { opacity: 0, y: 8 }}
animate={{ opacity: 1, y: 0 }}
exit={reduce ? { opacity: 1 } : { opacity: 0, y: -8 }}
transition={{ duration: reduce ? 0 : 0.28 }}
>
{children}
</motion.div>
);
}