Underline Slide Link
Hovering a link grows an underline from the left; leaving sweeps it away to the right
This effect uses fixed demo content, so custom text isn’t applied.
Hannah's Motion Library
Web motion effects × AI prompts
AI prompt
Text links in a nav bar: on mouse enter a thin underline grows from left to right; on mouse leave it keeps going and retracts to the right (rather than shrinking back the way it came), like a sweep of light. About 0.45 s, ease-in-out. (CSS: ::after is the underline with transform:scaleX(0); on hover scaleX(1) with transform-origin:left, and transform-origin:right when not hovered, transition cubic-bezier(.7,0,.2,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 text effects
346 more motion effectsText, buttons, cards, backgrounds, cursors… preview them all and copy AI prompts
Browse all effects →