Image lightbox with zoom from thumbnail
Portuguese name: Galeria que amplia a partir da miniatura
Click a thumbnail and the photo grows from its spot to screen size while the rest fades to dark. Inside you can move between photos with the arrow keys or a swipe, zoom, and pan around the photo with the mouse. On close it flies back to the thumbnail.

When to use it
For portfolios, project galleries, property photos, menus with dishes, anywhere a thumbnail is just an invitation to look closer. Use data-grande for the heavy version of the photo: the light thumbnail loads with the page and the big one only on open. Always give an alt or data-legenda; it becomes the caption and the text read by screen readers.
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="lightbox-zoom">
<img src="cachoeira-p.jpg" data-grande="cachoeira.jpg" alt="Cachoeira do Tabuleiro">
<img src="itambe-p.jpg" data-grande="itambe.jpg" alt="Serra do Itambé">
</div>
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
- Spring drawerphysics side sheet
- Drawerside sheet