- Slow Ken Burns drift on the hero artwork for cinematic depth. - Gentle breathing pulse on the brand glows behind Frank and the hero. - Silkier reveal easing (cubic-bezier .22/1/.36/1, 0.55s) site-wide. - Eased, longer hover transitions on the hero CTAs. - Smooth page scrolling, all guarded by prefers-reduced-motion.
27 lines
628 B
TypeScript
27 lines
628 B
TypeScript
"use client";
|
|
|
|
import { motion, useReducedMotion } from "motion/react";
|
|
import type { ReactNode } from "react";
|
|
|
|
interface RevealProps {
|
|
children: ReactNode;
|
|
className?: string;
|
|
delay?: number;
|
|
}
|
|
|
|
export function Reveal({ children, className, delay = 0 }: RevealProps) {
|
|
const prefersReducedMotion = useReducedMotion();
|
|
|
|
return (
|
|
<motion.div
|
|
className={className}
|
|
initial={{ opacity: 0, y: prefersReducedMotion ? 0 : 24 }}
|
|
whileInView={{ opacity: 1, y: 0 }}
|
|
viewport={{ once: true, margin: "-40px" }}
|
|
transition={{ duration: 0.55, delay, ease: [0.22, 1, 0.36, 1] }}
|
|
>
|
|
{children}
|
|
</motion.div>
|
|
);
|
|
}
|