Direction-aware Fill Button
Fills from where the mouse enters and retracts toward where it leaves
This effect uses fixed demo content, so custom text isn’t applied.
Hannah's Motion Library
Web motion effects × AI prompts
AI prompt
An outlined pill button. On mouse enter, an accent-colored circle grows from the exact point where the cursor entered the button until it fills the whole button, and the text switches to a color that contrasts with the fill. On mouse leave, the circle shrinks away toward the point where the cursor exited, so the color retracts in the direction you leave. About 0.55 s, ease-in-out. (How: button overflow:hidden; on pointerenter / pointerleave use getBoundingClientRect to get the cursor position within the button, write it to CSS variables --x, --y; the circle's diameter is twice the distance to the farthest corner so it always covers; the circle transitions transform:scale(0→1))
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
- Tap “Copy AI prompt”.
- 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).
- The AI writes code that matches your site’s colors. Paste it into your project, then fine-tune the timing and distances.
More button effects
346 more motion effectsText, buttons, cards, backgrounds, cursors… preview them all and copy AI prompts
Browse all effects →