Micro-interactions

Shadow Cursor

A custom cursor with a shadow at its heel — a precise dot leads while a lagging blade trails on a spring, and when it crosses an interactive element the trail pools and swells around it, inverting whatever lies beneath. Scoped entirely to its own stage; the page cursor is never touched.

Install

bun add motion

Props

PropTypeDefaultDescription
dotSizenumber8Size of the leading precise dot.
trailSizenumber36Size of the lagging trailing ring.
stiffnessnumber150Spring stiffness of the trailing ring — higher lags less.
dampingnumber15Spring damping of the trailing ring.
cursorColorstring (hex)"#a855f7"Color of the dot and trailing ring.
blendMode"difference" | "screen" | "exclusion" | "normal""difference"Mix-blend-mode of the cursor over content beneath it.
poolScalenumber2How much the trail swells when over an interactive element.

What It Demonstrates

Spring
Motion driven by physics (tension, mass, damping) rather than a set duration.
Follow-through
Parts of an element keep moving and settle slightly after the main motion stops, adding weight.
Hover effect
Visual change when the cursor moves over an element.
Momentum
Motion that carries velocity, especially after a drag or interruption.

Related Components

Appears In