Files
EpicNext-Cms/src/components/motion-reveal.tsx
T
openhands 3827f3e686
Deploy / release (push) Skipped
Deploy / deploy (push) Successful in 2m4s
Migrate from framer-motion to motion/react
2026-07-28 18:49:25 +02:00

25 lines
534 B
TypeScript

"use client";
import { motion } from "motion/react";
import type { ReactNode } from "react";
interface RevealProps {
children: ReactNode;
className?: string;
delay?: number;
}
export function Reveal({ children, className, delay = 0 }: RevealProps) {
return (
<motion.div
className={className}
initial={{ opacity: 0, y: 24 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, margin: "-50px" }}
transition={{ duration: 0.45, delay, ease: [0.25, 0.1, 0.25, 1] }}
>
{children}
</motion.div>
);
}