vibran

Marching ants button, animated dashed border button

Portuguese name: Botão com borda tracejada em marcha

Marching ants button: the dashed border runs around the button like a selection in an image editor. On hover the dashes speed up and the background gains a tint.

Preview of Marching ants button, animated dashed border button running live
Copy the promptAdjust colors and speed

When to use it

Selection, upload and tool actions: anything that suggests a crop or a marked area. Corners are square on purpose (the dashes are gradients and do not follow curves). The animation pauses when the button leaves the screen.

How to add it to your site

  1. Copy the prompt in the gallery. It comes with the effect's name and the full code. The prompt text is written in Portuguese, and AI builders handle that fine.
  2. Paste it into your AI: Lovable, Claude, Cursor, Bolt or v0.
  3. Done: the AI adds the effect to your project, just like you saw it here.

Use it in HTML

The effect is plain JavaScript, no library. Just put the data-efeito attribute on the element:

<button data-efeito="botao-formigas">Selecionar área</button>

More buttons effects

All 41 buttons effects →