STUDIO WORKSELECTED PROJECTSCONTACT
Desktop onlyINTERACTION_140CSS + JS
Cursor Image Preview
A small preview image follows the pointer over a list of links.
Mouse / LightView
A contextual word rides with the cursor over interactive areas. A small dot with no label before the trigger; expanding the dot into a labelled pill that lerps behind the pointer once the pointer entering an element with a data-cursor label.
/* Cursor Label — A contextual word rides with the cursor over interactive areas. */
.cursor-label {
--dur: 300ms;
--ease: cubic-bezier(0.22, 1, 0.36, 1);
--stagger: 60ms;
will-change: transform, opacity;
}
.cursor-label > * {
opacity: 0;
transform: translateY(14px);
animation: cursor-label-in var(--dur) var(--ease) forwards;
animation-delay: calc(var(--i, 0) * var(--stagger));
}
/* a small dot with no label -> expanding the dot into a labelled pill that lerps behind the pointer */
@keyframes cursor-label-in {
to {
opacity: 1;
transform: none;
filter: none;
}
}
@media (prefers-reduced-motion: reduce) {
.cursor-label > * {
opacity: 1;
transform: none;
animation: none;
}
}import { useEffect, useRef } from "react";
/** Cursor Label — trigger: the pointer entering an element with a data-cursor label */
export function CursorLabel({ 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-label" data-state="out">
{children}
</div>
);
}A small preview image follows the pointer over a list of links.
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.