INTERACTION_135CSS
Zoom Through Section
The section scales up and passes the viewer as they scroll.
Scroll / MediumView
A sticky visual holds while the copy beside it advances. The first step active, the rest at 40% opacity before the trigger; cross-fading the sticky visual and raising the active step once each copy step crossing the viewport centre.
/* Sticky Storytelling Section — A sticky visual holds while the copy beside it advances. */
.sticky-storytelling-section {
--dur: 480ms;
--ease: cubic-bezier(0.22, 1, 0.36, 1);
--stagger: 60ms;
will-change: transform, opacity;
}
.sticky-storytelling-section > * {
opacity: 0;
transform: translateY(14px);
animation: sticky-storytelling-section-in var(--dur) var(--ease) forwards;
animation-delay: calc(var(--i, 0) * var(--stagger));
}
/* the first step active, the rest at 40% opacity -> cross-fading the sticky visual and raising the active step */
@keyframes sticky-storytelling-section-in {
to {
opacity: 1;
transform: none;
filter: none;
}
}
@media (prefers-reduced-motion: reduce) {
.sticky-storytelling-section > * {
opacity: 1;
transform: none;
animation: none;
}
}import { useEffect, useRef } from "react";
/** Sticky Storytelling Section — trigger: each copy step crossing the viewport centre */
export function StickyStorytellingSection({ 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="sticky-storytelling-section" data-state="out">
{children}
</div>
);
}The section scales up and passes the viewer as they scroll.
Vertical scrolling drives a horizontal panel track.
A vertical line draws down and reveals each milestone.
Sections stack over one another like cards on a table.