Files
EpicNext-Cms/src/components/motion-reveal.tsx
T
openhands efd3b00075
CI / check (push) Successful in 2m27s
CI / deploy (push) Successful in 1m19s
CI / publish-container (push) Successful in 1m4s
feat(site): smoother motion across the landing pages
- 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.
2026-09-12 16:51:48 +02:00

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>
);
}