121

Cursor Trail

A line trails behind the cursor, thinning and fading

CursorHover & clickIdle loopUI interactionBackground decorCanvasCanvas trail

Hannah's Motion Library
Web motion effects × AI prompts

AI prompt

As the cursor moves, a smooth line trails behind it, thicker and clearer near the cursor and thinner and more transparent toward the tail, like a comet's tail; when the cursor stops, the tail gradually retracts into it. The cursor itself is a small dot. (Canvas 2D: each frame push the cursor position into an array keeping only the last ~28 points, draw the segments in order with line width and opacity increasing by index; size the canvas for devicePixelRatio; cursor:none on the container)

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 →