Skip to content

Mosaic Dissolve

Free

A picture whose tiles shrink away in place in a diagonal wave. Use it to hide a thing quietly, with no motion across the page.

  • React 19
  • Tailwind CSS 4

Added Nov 18, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Hide one tile of a grid. Nothing crosses its neighbors.

The sample also uses Button. One command adds them with this item:

profile-photo-grid.tsx

MosaicDissolve

<div>
PropTypeDefaultDescription
srcstring—The picture URL. Give src or source.
source—A picture the page already has: an <img>, a <canvas>, an ImageBitmap, or an OffscreenCanvas.
altRequiredstring—Names the picture for screen readers while it shows.
crossOrigin"""anonymous""use-credentials"—The CORS mode of a picture on another origin: the grains read its pixels.
fit"contain""cover"—How the picture fills the box, as object-fit. Default cover.
grainSizenumber—The side of one grain in CSS px. A very large box raises it, so the effect stays smooth.
dissolvedboolean—The picture is gone (controlled). true takes it apart; false brings it back.
restore"instant""play"—How the picture comes back: play runs the effect backward, instant shows it at once. Default play.
progressnumber—From 0 (whole) to 1 (gone): a gesture drives the effect and no clock runs. Leave it out to play.
seednumber—The same seed gives the same motion. Default: from the picture URL.
onDissolveEnd—Called when the last grain has left (or the fade has ended).
onRestoreEnd—Called when the picture is whole again after a played return.
originGrainOrigin—Where the effect starts. press is the last press in the picture.
spreadnumber—From 0 to 0.85: how much of the effect passes between the first grain that leaves and the last.
jitternumber—From 0 to 0.85: how much of each grain's start is random.
durationnumber—How long the wave takes to cross the picture, in ms. Default 1400.
amplitudenumber—From 0 to 2: how far a tile turns as it shrinks. 1 makes a diamond; 0 keeps it square. Default 1.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use it in grids and cards where nothing may fly over nearby content.
  • Set amplitude to 0 for square tiles with no turn.
  • Set grainSize for the tile size: 8 is bold, 4 is a soft wave.
Out
draw · 1.4s · tiles shrink and turn into diamonds in a diagonal wave
Back
draw · 1.4s · the tiles grow back along the same diagonal
  1. AddedMosaic Dissolve.
Open the release