STUDIO WORKSELECTED PROJECTSCONTACT
VIEWDesktop onlyINTERACTION_138CSS + JS
Cursor Label
A contextual word rides with the cursor over interactive areas.
Mouse / LightView
A small preview image follows the pointer over a list of links. Scaled to 0.8 at 0 opacity before the trigger; fading the row's image in at the pointer with a lerped follow once hovering a list row.
/* Cursor Image Preview — A small preview image follows the pointer over a list of links. */
.cursor-image-preview {
--dur: 320ms;
--ease: cubic-bezier(0.22, 1, 0.36, 1);
--stagger: 60ms;
will-change: transform, opacity;
}
.cursor-image-preview > * {
opacity: 0;
transform: translateY(14px);
animation: cursor-image-preview-in var(--dur) var(--ease) forwards;
animation-delay: calc(var(--i, 0) * var(--stagger));
}
/* scaled to 0.8 at 0 opacity -> fading the row's image in at the pointer with a lerped follow */
@keyframes cursor-image-preview-in {
to {
opacity: 1;
transform: none;
filter: none;
}
}
@media (prefers-reduced-motion: reduce) {
.cursor-image-preview > * {
opacity: 1;
transform: none;
animation: none;
}
}import { useEffect, useRef } from "react";
/** Cursor Image Preview — trigger: hovering a list row */
export function CursorImagePreview({ 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="cursor-image-preview" data-state="out">
{children}
</div>
);
}A contextual word rides with the cursor over interactive areas.
Dot plus trailing ring with contextual labels.
Layers drift at different depths as the pointer moves.
A wide soft light follows the pointer across a dark section.