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.

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
- 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:
<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
- Vertical glass dock, spring active circleDock vertical de vidro
- Swipe drawer, off-canvas sidebarGaveta lateral com gesto
- Searchable sidebar, keyboard shortcutSidebar com busca e atalho
- Sidebar with rolling counters, odometer badgesSidebar com contadores que rolam
- Sidebar with spring active indicatorSidebar com indicador de mola
- Pinned sidebar, favorite menu itemsSidebar com itens fixados
- Reorderable sidebar, drag to sort menuSidebar com itens reordenáveis
- Accordion sidebar, nested menuSidebar com submenus em acordeão