STUDIO WORKSELECTED PROJECTSCONTACT
Desktop onlyINTERACTION_141CSS + JS
Cursor Trail
A short trail of fading dots follows the pointer.
Mouse / MediumView
A wide soft light follows the pointer across a dark section. Hidden at 0 opacity before the trigger; moving the gradient centre to the pointer with a short ease once pointer movement inside the section.
/* Cursor Spotlight — A wide soft light follows the pointer across a dark section. */
.cursor-spotlight {
--dur: 260ms;
--ease: cubic-bezier(0.22, 1, 0.36, 1);
--stagger: 60ms;
will-change: transform, opacity;
}
.cursor-spotlight > * {
opacity: 0;
transform: translateY(14px);
animation: cursor-spotlight-in var(--dur) var(--ease) forwards;
animation-delay: calc(var(--i, 0) * var(--stagger));
}
/* hidden at 0 opacity -> moving the gradient centre to the pointer with a short ease */
@keyframes cursor-spotlight-in {
to {
opacity: 1;
transform: none;
filter: none;
}
}
@media (prefers-reduced-motion: reduce) {
.cursor-spotlight > * {
opacity: 1;
transform: none;
animation: none;
}
}import { useEffect, useRef } from "react";
/** Cursor Spotlight — trigger: pointer movement inside the section */
export function CursorSpotlight({ 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-spotlight" data-state="out">
{children}
</div>
);
}A short trail of fading dots follows the pointer.
Dot plus trailing ring with contextual labels.
Large ambient light that trails the pointer across a section.
A contextual word rides with the cursor over interactive areas.