---
title: "Melt Dissolve"
description: "Let a picture soften like warm wax. Its columns sag at different speeds and run down in long drips."
url: https://gelatinui.com/components/melt-dissolve
markdown_url: https://gelatinui.com/components/melt-dissolve.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/melt-dissolve"
version: "2026-11-18"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Melt Dissolve

> Let a picture soften like warm wax. Its columns sag at different speeds and run down in long drips.

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

## When to use it

Best for: Slow, dreamy exits and pictures that follow a slider, a timer, or the scroll.

- Use it when the loss should feel slow, such as an expiring photo.
- Drive `progress` from a slider or a timer for a melt that people control.
- Raise `gravity` for longer drips.

## When not to use it

- For a fast burn with sparks, use [Ember Dissolve](https://gelatinui.com/components/ember-dissolve.md).
- For hard columns that fall over, use [Topple Dissolve](https://gelatinui.com/components/topple-dissolve.md).

## Notes for agents

- The lower part of the picture melts first. Pass `origin` to change where it starts.
- `progress` goes from 0 (whole) to 1 (gone), and no clock runs while it is set.
- Drips run about one box height below the box. Leave free space under it.
- No drip moves sideways, so the width of the layout is safe.

## Anatomy

```text
MeltDissolve
```

## API reference

### MeltDissolve

| 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 picture takes to melt, in ms. Default `2600`. |
| `gravity` | `number` |  | How far the drips run. Default `1`. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| MeltDissolve | `melt-dissolve` |  |  |  |

## Usage

Let a slider set how far the picture melts.

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

```bash
npx shadcn@latest add @gelatin-ui-pro/melt-dissolve @gelatin-ui/slider
```

```tsx title="candle-photo.tsx"
"use client";

import { useState } from "react";

import { MeltDissolve } from "@/components/pro/effects/melt-dissolve";
import { Slider } from "@/components/ui/slider";

export function CandlePhoto() {
  const [heat, setHeat] = useState(0);
  return (
    <div className="flex w-80 max-w-full flex-col gap-4 pb-56">
      <MeltDissolve
        src="/photos/chapel.webp"
        alt="A chapel lit by candles"
        progress={heat}
        className="w-full"
      />
      <Slider
        aria-label="Heat"
        min={0}
        max={1}
        step={0.01}
        value={heat}
        onValueChange={(value) => {
          setHeat(Array.isArray(value) ? (value[0] ?? 0) : value);
        }}
      />
    </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-pro/melt-dissolve
```

It adds 35 registry items: 34 files, 6531 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

- [Ember Dissolve](https://gelatinui.com/components/ember-dissolve.md)
- [Topple Dissolve](https://gelatinui.com/components/topple-dissolve.md)
- [Mask Reveal](https://gelatinui.com/components/mask-reveal.md)
- [Crumple to Delete](https://gelatinui.com/components/crumple-to-delete.md)

## Motion

| Part | Motion |
| --- | --- |
| Melt | heatPrint · 2.6s · columns sag and stretch into drips, then fade |
| Back | heatPrint · 2.6s · the drips pull up and harden |
