vibran

Collapsible sidebar, icon rail

Portuguese name: Sidebar que recolhe para ícones

A dashboard sidebar that shrinks to an icon-only rail with an animated width, and a tooltip on hover or keyboard focus for each icon. Ctrl+B toggles it, the choice is remembered, and on phones it starts collapsed.

Preview of Collapsible sidebar, icon rail running live
Copy the promptAdjust colors and speed

When to use it

For clinic, shop or internal dashboards where people spend the day on screen and need room for tables. Every item needs an icon and its text inside a <span>, otherwise the tooltip has nothing to show. Use data-recolher-abaixo to start collapsed on phones and data-lembrar to remember the choice; tune --sb-largura and --sb-trilho to your content.

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:

<aside data-efeito="sidebar-recolhivel" data-recolher-abaixo="600">
  <nav aria-label="Principal">
    <a href="#" aria-current="page"><svg>…</svg><span>Agenda</span></a>
    <a href="#"><svg>…</svg><span>Pacientes</span><span data-selo>3</span></a>
  </nav>
  <nav>
    <button type="button" data-alternar><svg>…</svg><span>Recolher menu</span></button>
  </nav>
</aside>

More sidebar effects

All 22 sidebar effects →