"use client"; import Image from "next/image"; import { motion, useScroll, useTransform } from "framer-motion"; import { useRef } from "react"; export default function ScrollHero({ src, alt, }: { src: string; alt: string; }) { const ref = useRef(null); const { scrollYProgress } = useScroll({ target: ref, offset: ["start start", "end start"], }); // Tech-style: slightly more noticeable than Apple A, but still classy const scale = useTransform(scrollYProgress, [0, 1], [1.05, 1.0]); const y = useTransform(scrollYProgress, [0, 1], [0, 18]); return (
{alt}
); }