Magnetic pill navbar, spring hover indicator
Portuguese name: Menu com pílula magnética
A highlight pill follows the mouse across the menu items on a spring: it is pulled toward the item, leans toward the cursor and returns to the active item when the mouse leaves.

When to use it
A top menu for a business site, SaaS or portfolio with 3 to 6 items. Phones have no mouse, so the pill just marks the tapped item and the active link. Lower data-forca for a subtler pull and tweak data-mola for a looser or tighter spring. It also follows Tab, with focus pulling the pill.
How to add it to your site
- 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.
- Paste it into your AI: Lovable, Claude, Cursor, Bolt or v0.
- 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:
<nav data-efeito="menu-pilula-magnetica"><a href="#inicio" aria-current="page">Início</a><a href="#servicos">Serviços</a><a href="#contato">Contato</a></nav>
More navigation effects
- Folder tabstrapezoid tabs
- Expandable icon tabs, expanding tab barAbas de ícone que expandem
- Sliding tabs, directional tab transition, stretching tab underlineAbas deslizantes
- Sliding pill tabssegmented control
- Gooey tabs, liquid tab indicator, liquid navbarAbas líquidas
- Curved bottom tab bar, jumping bubble tab bar, mobile bottom navigationBarra de app com bolha
- Bottom tab bar in 11 stylesBarra inferior de app em 11 estilos
- Shrinking glass navbar, sticky header on scrollBarra que encolhe e vira vidro