vibran

Workspace switcher sidebar

Portuguese name: Sidebar com troca de espaço

The top of the sidebar shows the current company with avatar, name and plan, and opens a menu to switch. On pick, the avatar pops, the accent colour changes and marked fields in the content swap their values. Arrows, Enter, Esc and digits 1 to 9 work.

Preview of Workspace switcher sidebar running live
Copy the promptAdjust colors and speed

When to use it

For SaaS where one account manages several companies, shops or projects: agencies, accounting, franchises. Each option carries its data in data-* attributes, and any element on the page with data-campo="attribute-name" receives the value on switch. The "espaco" event leaves the sidebar with the data, so you can really reload the screen. Keep the plan or role visible: it helps people know which space they are in.

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-workspace">
  <button data-espaco-botao><i data-espaco-sigla></i><span><b data-espaco-nome></b><small data-espaco-plano></small></span></button>
  <div data-espaco-menu hidden>
    <button data-espaco data-sigla="CS" data-nome="Clínica Sorriso" data-plano="Plano Pro" data-cor="#34d3a4" data-vendas="R$ 4.120,00">…</button>
  </div>
  <nav>…</nav>
</aside>
<strong data-campo="vendas"></strong>

More sidebar effects

All 22 sidebar effects →