Media
INTERACTION_110CSS
Image Distortion
A subtle ripple runs through the image on hover.
Images / HeavyView
Thumbnails trail the cursor and fade out behind it. All thumbnails hidden before the trigger; placing the next thumbnail at the pointer, then scaling and fading it out once pointer movement beyond a 90px distance threshold.
/* Image Trail — Thumbnails trail the cursor and fade out behind it. */
.image-trail {
--dur: 700ms;
--ease: cubic-bezier(0.22, 1, 0.36, 1);
--stagger: 60ms;
will-change: transform, opacity;
}
.image-trail > * {
opacity: 0;
transform: translateY(14px);
animation: image-trail-in var(--dur) var(--ease) forwards;
animation-delay: calc(var(--i, 0) * var(--stagger));
}
/* all thumbnails hidden -> placing the next thumbnail at the pointer, then scaling and fading it out */
@keyframes image-trail-in {
to {
opacity: 1;
transform: none;
filter: none;
}
}
@media (prefers-reduced-motion: reduce) {
.image-trail > * {
opacity: 1;
transform: none;
animation: none;
}
}import { useEffect, useRef } from "react";
/** Image Trail — trigger: pointer movement beyond a 90px distance threshold */
export function ImageTrail({ 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="image-trail" data-state="out">
{children}
</div>
);
}A subtle ripple runs through the image on hover.
A thumbnail expands to fill the viewport from its own position.
A frame sequence spins the product as the pointer drags.
The image uncovers behind a mask while it settles from a slow zoom.