vibran

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.

Preview of Zoom modal running live
Copy the promptAdjust colors and speed

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

  1. 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.
  2. Paste it into your AI: Lovable, Claude, Cursor, Bolt or v0.
  3. 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

All 15 modals effects →