Files
gitlab-instance-0a899031_do…/components/scroll-reveal.tsx
2026-04-02 07:15:42 -05:00

23 lines
522 B
TypeScript

"use client";
import { motion } from "framer-motion";
import { PropsWithChildren } from "react";
export function ScrollReveal({
children,
delay = 0,
y = 24,
}: PropsWithChildren<{ delay?: number; y?: number }>) {
return (
<motion.div
className="w-full min-w-0 max-w-full"
initial={{ opacity: 0, y }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, amount: 0.2 }}
transition={{ duration: 0.55, ease: "easeOut", delay }}
>
{children}
</motion.div>
);
}