171

Border Draw Button

Hovering the button draws its four borders in sequence

ButtonHover & clickUI interactionEmphasisCSSCSS transition

Hannah's Motion Library
Web motion effects × AI prompts

AI prompt

A button with only a very faint thin border at rest; on mouse enter, an accent-colored border draws in sequence from the top-left corner: top edge rightward → right edge downward → bottom edge leftward → left edge upward, about 0.18 s per segment, enclosing the button, after which the text also turns the accent color; on leave it retracts in reverse order. (CSS: four absolutely positioned line elements, each using scaleX / scaleY with different transform-origins; transition-delay sets the order, with opposite delays for hover and non-hover states)

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

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

Browse all effects →