vibran

Reveal lens

Also called: x-ray window

Two versions of the same screen are stacked and a soft round window follows the mouse to show the second one underneath: the finished site and its layout blueprint, for instance. Holding the click opens the window until it covers everything.

Preview of Reveal lens running live
Copy the promptAdjust colors and speed

When to use it

To show before and after without two separate blocks: design and sketch, color photo and x-ray, product and interior, a map of today and of 1950. Both layers need the same size and structure so what is underneath lines up. Use a larger data-raio on big pages. With no mouse the window drifts around until someone touches it, and screen reader users only read the base layer.

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:

<section data-efeito="janela-revela" data-raio="150" style="height:480px">
  <div data-camada="base">Versão que aparece</div>
  <div data-camada="revela">Versão que a janela mostra</div>
</section>

More mouse effects

All 14 mouse effects →