INTERACTION_127CSS
Sticky Storytelling Section
A sticky visual holds while the copy beside it advances.
Scroll / LightView
Vertical scrolling drives a horizontal panel track. The track at translateX(0) before the trigger; translating the track by the remaining track width across the progress range once scroll progress through the pinned section.
/* Horizontal Scroll Section — Vertical scrolling drives a horizontal panel track. */
.horizontal-scroll-section {
--dur: scroll-linked;
--ease: linear;
--stagger: 60ms;
will-change: transform, opacity;
}
.horizontal-scroll-section > * {
opacity: 0;
transform: translateY(14px);
animation: horizontal-scroll-section-in var(--dur) var(--ease) forwards;
animation-delay: calc(var(--i, 0) * var(--stagger));
}
/* the track at translateX(0) -> translating the track by the remaining track width across the progress range */
@keyframes horizontal-scroll-section-in {
to {
opacity: 1;
transform: none;
filter: none;
}
}
@media (prefers-reduced-motion: reduce) {
.horizontal-scroll-section > * {
opacity: 1;
transform: none;
animation: none;
}
}import { useEffect, useRef } from "react";
/** Horizontal Scroll Section — trigger: scroll progress through the pinned section */
export function HorizontalScrollSection({ 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="horizontal-scroll-section" data-state="out">
{children}
</div>
);
}A sticky visual holds while the copy beside it advances.
The product mockup is pinned while its features annotate in turn.
Scroll scrubs through an image sequence like a film strip.
The section scales up and passes the viewer as they scroll.