Drawer
Also called: side sheet
A drawer that slides in from the right, left, or bottom over the page. It suits a cart, menu, or filters. Close it with Esc, a click outside, or the close button.

When to use it
For a shop cart, catalog filters, a mobile menu or item details without leaving the list. Stuff it with too much and the drawer becomes a squeezed page; at that point, send people to a page of its own. Use data-lado="baixo" on phones, where thumbs reach better, and set --gaveta-largura so the content fits.
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:
<button data-efeito="gaveta" data-abrir="#carrinho" data-lado="direita">Ver carrinho</button>
<div id="carrinho" hidden>
...
<button data-fechar>Fechar</button>
</div>
Sites that use this effect
- Barro VivoStore
More modals effects
- Cookie consent bannerpreferences card
- Toast notificationAviso no canto da tela
- Stacked toast notificationssonner-style
- Hold to delete confirmation dialogConfirmar apagando segurando
- Depth modalglass dialog with background scale
- Bottom sheetdraggable drawer
- Image lightbox with zoom from thumbnailGaleria que amplia a partir da miniatura
- Spring drawerphysics side sheet