INTERACTION_128CSS + JS
Pinned Product Showcase
The product mockup is pinned while its features annotate in turn.
Scroll / MediumView
Scroll scrubs through an image sequence like a film strip. Frame 0 painted before the trigger; mapping progress to frame index and painting on requestAnimationFrame once scroll progress through the pinned section.
/* Scroll Controlled Frame Sequence — Scroll scrubs through an image sequence like a film strip. */
.scroll-frame-sequence {
--dur: scroll-linked;
--ease: linear;
--stagger: 60ms;
will-change: transform, opacity;
}
.scroll-frame-sequence > * {
opacity: 0;
transform: translateY(14px);
animation: scroll-frame-sequence-in var(--dur) var(--ease) forwards;
animation-delay: calc(var(--i, 0) * var(--stagger));
}
/* frame 0 painted -> mapping progress to frame index and painting on requestAnimationFrame */
@keyframes scroll-frame-sequence-in {
to {
opacity: 1;
transform: none;
filter: none;
}
}
@media (prefers-reduced-motion: reduce) {
.scroll-frame-sequence > * {
opacity: 1;
transform: none;
animation: none;
}
}import { useEffect, useRef } from "react";
/** Scroll Controlled Frame Sequence — trigger: scroll progress through the pinned section */
export function ScrollControlledFrameSequence({ children }: { children: React.ReactNode }) {
const ref = useRef<HTMLDivElement>(null);
useEffect(() => {
const el = ref.current;
if (!el) return;
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
el.dataset["state"] = "in";
return;
}
const io = new IntersectionObserver(
([entry]) => {
if (entry?.isIntersecting) {
el.dataset["state"] = "in";
io.unobserve(el);
}
},
{ threshold: 0.2 },
);
io.observe(el);
return () => io.disconnect();
}, []);
return (
<div ref={ref} className="scroll-frame-sequence" data-state="out">
{children}
</div>
);
}The product mockup is pinned while its features annotate in turn.
Vertical scrolling drives a horizontal panel track.
Content fades and rises as it enters the viewport.