162

Underline Slide Link

Hovering a link grows an underline from the left; leaving sweeps it away to the right

TextHover & clickUI interactionCSSCSS hover

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

  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 text effects

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

Browse all effects →