321

Marching Ants Selection

A dashed selection box with flowing lines and corner handles; its size label updates live

Shape & SVGIdle loopUI interactionEmphasisCSSstroke-dashoffset

Hannah's Motion Library
Web motion effects × AI prompts

AI prompt

Like a selection box in a design tool: a dashed rectangle surrounds the content, its dashes flowing continuously in one direction (“marching ants”), with square handles at the four corners; the box smoothly changes between two sizes and the size label below (width × height) updates its numbers live. (SVG rect: stroke-dasharray 6 5, keyframes looping stroke-dashoffset from 0 to −11; the box's width/height change with CSS keyframes; JS reads the size periodically to update the label)

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 shape & svg effects

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

Browse all effects →