Swipe drawer, off-canvas sidebar
Portuguese name: Gaveta lateral com gesto
A mobile side menu that follows your finger: drag from the edge to open, drag the drawer to close, and on release it decides by speed and position. It also opens with a button, closes with Esc or a tap on the backdrop, and traps focus.

When to use it
For websites and apps on phones, where a fixed bar does not fit. The container (data-efeito) should fill the app screen and the gesture only works at the edge, so it does not fight carousels or scrolling; vertical scroll stays free. It also works with a mouse, which helps testing. Adjust data-borda if the zone is hard to hit, and use data-lado="direita" for a menu on the other side.
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:
<div data-efeito="sidebar-gaveta-gesto" data-borda="28">
<button data-abrir aria-label="Abrir menu"><svg>…</svg></button>
<aside data-gaveta aria-label="Menu">
<nav><a href="#">Cardápio</a></nav>
<button data-fechar>Fechar</button>
</aside>
<main>…</main>
</div>
More sidebar effects
- Vertical glass dock, spring active circleDock vertical de vidro
- 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
- Workspace switcher sidebarSidebar com troca de espaço