vibran

Sidebar with spring active indicator

Portuguese name: Sidebar com indicador de mola

The active item highlight slides to the new item on a spring: the leading edge arrives first, the trailing edge stretches, and it settles with a small bounce. Arrow keys walk through the items and the page title follows.

Preview of Sidebar with spring active indicator running live
Copy the promptAdjust colors and speed

When to use it

Gives life to menus with few options, 5 to 9, where people switch screens often. The indicator measures each item at its real size, so it works with text of any width. Elements with data-sb-titulo and data-sb-descricao receive the name and description of the active item, handy for demos or to swap a page heading. Use data-mola below 1 for something calmer.

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:

<nav data-efeito="sidebar-indicador-mola" data-forma="pilula" data-mola="1">
  <a href="#" aria-current="page" data-descricao="Resumo do dia"><svg>…</svg><span>Painel</span></a>
  <a href="#" data-descricao="Pedidos em aberto"><svg>…</svg><span>Pedidos</span></a>
</nav>
<h1 data-sb-titulo></h1>
<p data-sb-descricao></p>

More sidebar effects

All 22 sidebar effects →