---
title: "Mosaic Dissolve"
description: "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."
url: https://gelatinui.com/components/mosaic-dissolve
markdown_url: https://gelatinui.com/components/mosaic-dissolve.md
access: free
install: "npx shadcn@latest add @gelatin-ui/mosaic-dissolve"
registry_item: https://gelatinui.com/r/mosaic-dissolve.json
version: "2026-11-18"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Mosaic Dissolve

> 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.

Page: https://gelatinui.com/components/mosaic-dissolve

## When to use it

Best for: Hiding a picture in a tight layout, since every tile shrinks in its own place.

- 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.

## When not to use it

- For long slats instead of small tiles, use [Blinds Dissolve](https://gelatinui.com/components/blinds-dissolve.md).
- For tiles that change places first, use [Shuffle Dissolve](https://gelatinui.com/components/shuffle-dissolve.md).

## Notes for agents

- No tile moves: each one shrinks to nothing at its own center.
- The wave runs on a diagonal from the top of the start side, and follows the reading direction.
- It stays fully inside the box, so `overflow-hidden` parents are safe.
- Tiles are 8 px by default, so each one reads on its own.

## Anatomy

```text
MosaicDissolve
```

## API reference

### MosaicDissolve

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `src` | `string` |  | The picture URL. Give `src` or `source`. |
| `source` | `union` |  | A picture the page already has: an `<img>`, a `<canvas>`, an `ImageBitmap`, or an `OffscreenCanvas`. |
| `alt` | `string` |  | Names the picture for screen readers while it shows. |
| `crossOrigin` | `GrainCrossOrigin` |  | The CORS mode of a picture on another origin: the grains read its pixels. |
| `fit` | `GrainFit` |  | How the picture fills the box, as `object-fit`. Default `cover`. |
| `grainSize` | `number` |  | The side of one grain in CSS px. A very large box raises it, so the effect stays smooth. |
| `dissolved` | `boolean` |  | 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`. |
| `progress` | `number` |  | From 0 (whole) to 1 (gone): a gesture drives the effect and no clock runs. Leave it out to play. |
| `seed` | `number` |  | The same seed gives the same motion. Default: from the picture URL. |
| `onDissolveEnd` | `function` |  | Called when the last grain has left (or the fade has ended). |
| `onRestoreEnd` | `function` |  | Called when the picture is whole again after a played return. |
| `origin` | `GrainOrigin` |  | Where the effect starts. `press` is the last press in the picture. |
| `spread` | `number` |  | From 0 to 0.85: how much of the effect passes between the first grain that leaves and the last. |
| `jitter` | `number` |  | From 0 to 0.85: how much of each grain's start is random. |
| `duration` | `number` |  | How long the wave takes to cross the picture, in ms. Default `1400`. |
| `amplitude` | `number` |  | From 0 to 2: how far a tile turns as it shrinks. `1` makes a diamond; `0` keeps it square. Default `1`. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| MosaicDissolve | `mosaic-dissolve` |  |  |  |

## Usage

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

The sample also uses `button`, which this add does not write. One command adds them with this item:

```bash
npx shadcn@latest add @gelatin-ui/mosaic-dissolve @gelatin-ui/button
```

```tsx title="profile-photo-grid.tsx"
"use client";

import { useState } from "react";

import { MosaicDissolve } from "@/components/effects/mosaic-dissolve";
import { Button } from "@/components/ui/button";

export function ProfilePhoto() {
  const [hidden, setHidden] = useState(false);
  return (
    <div className="grid w-96 max-w-full grid-cols-[1fr_auto] items-end gap-3">
      <MosaicDissolve
        src="/photos/museum-front.webp"
        alt="A museum front with tall columns"
        dissolved={hidden}
        grainSize={6}
        className="w-full"
      />
      <Button variant="outline" size="sm" onClick={() => setHidden((value) => !value)}>
        {hidden ? "Show" : "Hide"}
      </Button>
    </div>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/mosaic-dissolve
```

It adds 35 registry items: 34 files, 6527 lines, and the npm packages `@mantine/hooks`, `@xstate/react`, `clsx`, `motion`, `tailwind-merge`, `xstate`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Blinds Dissolve](https://gelatinui.com/components/blinds-dissolve.md)
- [Shuffle Dissolve](https://gelatinui.com/components/shuffle-dissolve.md)
- [Scratch Card](https://gelatinui.com/components/scratch-card.md)
- [Zoom Reveal](https://gelatinui.com/components/zoom-reveal.md)

## Motion

| Part | Motion |
| --- | --- |
| 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 |
