vibran

Magnetic button

Portuguese name: Botão magnético

A magnetic button that gets pulled toward the mouse as it approaches and returns to its place when the mouse leaves.

Preview of Magnetic button running live
Copy the promptAdjust colors and speed

When to use it

A subtle touch for the main button on portfolio, agency or studio sites. On small, closely spaced buttons the pull throws off aim. Lower data-forca on large buttons; on phones it simply does nothing.

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:

<a class="botao" data-efeito="magnetico">Pedir orçamento</a>

Sites that use this effect

More buttons effects

All 41 buttons effects →