vibran

Accordion sidebar, nested menu

Portuguese name: Sidebar com submenus em acordeão

Menu groups that open and close with an animated height and a rotating arrow, a guide line on sub-items and arrow-key navigation. When a group is closed, a dot shows that the active item sits inside it.

Preview of Accordion sidebar, nested menu running live
Copy the promptAdjust colors and speed

When to use it

For systems with many screens grouped into a few sections: finance, ERP, shop dashboards. Two levels is the healthy limit; three calls for another pattern such as a tree. Each group is a button followed by a list, and the code wires up the accessibility attributes itself. Use data-unico="sim" when the bar is short and only one group should stay open.

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-acordeao" data-unico="nao">
  <a href="#" aria-current="page"><svg>…</svg><span>Visão geral</span></a>
  <div>
    <button aria-expanded="true"><svg>…</svg><span>Lançamentos</span><svg class="seta">…</svg></button>
    <ul><li><a href="#">Receitas</a></li><li><a href="#">Despesas</a></li></ul>
  </div>
</nav>

More sidebar effects

All 22 sidebar effects →