252

Sticky Cursor

The cursor snaps to a button and wraps around it while gently pulling the button

CursorHover & clickUI interactionEmphasisGSAPGSAP

Hannah's Motion Library
Web motion effects × AI prompts

AI prompt

A row of buttons in a nav bar with a small round cursor: when the cursor approaches a button, the dot is “pulled” onto it and morphs into a rounded rectangle wrapping the whole button, still shifting slightly with the mouse inside the button; the button itself is gently pulled toward the mouse and its text and background invert; moving off the button shrinks the dot back and the button springs into place. (GSAP: on mousemove check whether the cursor is within a button (with a little padding); if so tween the cursor's x/y/width/height to the button's center and size + offset × 0.12, otherwise tween back to a dot; button x/y = offset × 0.15, power3.out)

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 →