Skip to content
Componentes

Images and media · THM exclusive

Mergulho

On hover, the photo warps like liquid and turns into a second image.

Mergulho · Portuguese for a dive.

In short

Mergulho is an exclusive THM Componentes component that swaps one image for another on hover: a noise field warps the photo like liquid, with a slight color split halfway through, until the second image shows. Built with WebGL and no dependencies, it suits portfolio cards, case studies and before-and-after shots.

The catalog, this component's prompt and its sample texts are in Brazilian Portuguese. AI coding assistants apply the prompt the same way.

Mergulho: On hover, the photo warps like liquid and turns into a second image.
Capture of the catalog demo

What it looks like

Picture a photo reflected in water that someone stirs with a hand. When the cursor enters, the first image stretches along a diagonal, ripples with an organic noise and blends into the second image in a little over a second, with a faint color fringe along the edges midway. When the cursor leaves, the effect runs backwards and the first photo returns. The same happens when a focusable element inside the component receives keyboard focus. Both images fill the area without stretching, and any content you place inside sits on top.

You may be looking for this if you asked for something like

  • a photo that turns into another one when I hover, like it is melting
  • a liquid effect when the card image changes on hover
  • an image that distorts and reveals the after shot when the mouse enters
  • portfolio cards that swap the picture with a fluid effect
  • that agency-site hover where the image ripples and changes
  • show before and after without a button, just by hovering
  • make my project gallery look like an award-winning site

Also known as

  • displacement hover
  • image distortion hover
  • WebGL image transition
  • liquid hover effect
  • displacement map transition
  • image swap on hover

When to use

  • Portfolio cards for studios, agencies or photographers
  • A grid of case studies where each project has two images
  • Before and after shots of a renovation, treatment or photo edit
  • A product showcase that shows the item in use on hover

When to avoid

  • Sites visited almost only on phones, where hover does not exist; use autoplay there
  • Pages with dozens of cards, since each instance opens its own WebGL context
  • Images from another domain without CORS enabled, which will not load as textures

How to ask your AI

Sample request
Create a WebGL displacement hover transition for my portfolio cards: on hover, the photo warps like liquid and reveals a second image. I want an instant swap for reduced motion, rendering paused off screen and a static image as a fallback.

With THM Componentes, you paste the full prompt from the catalog, which already includes this component's source code, and the AI reproduces this exact effect instead of improvising.

Questions about Mergulho

Does Mergulho work on phones?

Touch screens have no hover, so Mergulho shows the second image while a finger is pressed on it and returns when the finger lifts. On phones, the autoplay prop alternates both images by itself at regular intervals. The effect needs WebGL, and the prompt tells your AI to provide a static fallback in Nuxt.

Can I change the images and direction in Mergulho?

Yes. Mergulho takes the starting image and the revealed one through the src1 and src2 props, and the displacement strength, angle, noise scale and duration are props too. Images must come from the same domain or with CORS enabled, as the prompt points out, because they become textures on the graphics card.

Does Mergulho respect reduced motion settings?

Yes. When the reduced motion preference is on, Mergulho swaps the images at once, without the animated warp, and still shows the second image on hover. The component also stops drawing when it leaves the screen, which spares the graphics card while people read other sections.

Images and media

Related components

Give your AI a studio-grade repertoire

268 Vue and Nuxt components, 115 exclusive, a ready prompt in every one. Single payment, lifetime access and a 7-day guarantee.