Zoom modal
Also called: morphing dialog
A zoom modal. A button opens a window that grows from the button's position to the center of the screen while the background dims. Close it with Esc, a click outside, or the close button, and it shrinks back into the button.

When to use it
For details without leaving the page: what a plan includes, a property's info sheet, an enlarged dish photo. Long forms inside a modal are rough on phones; use a page for those. Shorten --modal-tempo if people will open and close it often.
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="modal-zoom" data-abrir="#plano">Ver plano</button>
<div id="plano" hidden>
...
<button data-fechar>Fechar</button>
</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
- Image lightbox with zoom from thumbnailGaleria que amplia a partir da miniatura
- Spring drawerphysics side sheet