253

Velocity Stretch Cursor

A round cursor stretches along its direction with speed and returns to a circle when still

CursorHover & clickUI interactionHeadline & heroCSSJS rAF

Hannah's Motion Library
Web motion effects × AI prompts

AI prompt

A round cursor follows the mouse with a smooth lag, computing its speed each frame: the faster it moves, the more the circle stretches along its direction of travel and flattens perpendicular to it, like springy jelly; when the mouse stops it slowly returns to a perfect circle. (JS requestAnimationFrame: lerp the position toward the target; speed = this frame's displacement length, angle = atan2(dy,dx); transform = translate → rotate(angle) → scale(1 + speed factor, 1 − speed factor × 0.45), with the speed factor itself lerped to avoid jitter)

When you copy it, a note to “match the site’s existing theme colors” is added automatically, so you don’t need to specify colors.

How to use it

  1. Tap “Copy AI prompt”.
  2. Paste it into an AI such as ChatGPT or Claude, and tell it which element on your site to apply it to (for example, the homepage headline or a buy button).
  3. The AI writes code that matches your site’s colors. Paste it into your project, then fine-tune the timing and distances.

More cursor effects

346 more motion effectsText, buttons, cards, backgrounds, cursors… preview them all and copy AI prompts

Browse all effects →