---
title: "Ember Dissolve"
description: "Burn a picture away from its lower edge. A glowing line climbs the image, and the burned part rises as sparks."
url: https://gelatinui.com/components/ember-dissolve
markdown_url: https://gelatinui.com/components/ember-dissolve.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/ember-dissolve"
version: "2026-11-18"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Ember Dissolve

> Burn a picture away from its lower edge. A glowing line climbs the image, and the burned part rises as sparks.

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

## When to use it

Best for: A final, serious removal, where the picture should seem destroyed and not only hidden.

- Use it for one-time photos, secrets, and other content that does not come back.
- Set `heat` to a brand color for a cold or a chemical burn.
- Lower `wind` to keep the sparks near the picture in a tight layout.

## When not to use it

- For a slow, soft loss with no fire, use [Melt Dissolve](https://gelatinui.com/components/melt-dissolve.md).
- For a happy moment, use [Firework Dissolve](https://gelatinui.com/components/firework-dissolve.md).

## Notes for agents

- The burn starts at the bottom edge. Pass `origin` to start it from another side.
- The sparks rise above the box. A parent with `overflow-hidden` cuts them off.
- `heat` takes any CSS color, tokens too.
- A picture on another origin needs CORS headers and `crossOrigin`. Without them it fades out.

## Anatomy

```text
EmberDissolve
```

## API reference

### EmberDissolve

| 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 burn takes to cross the picture, in ms. Default `2600`. |
| `wind` | `number` |  | How high the sparks rise. Default `1`. |
| `turbulence` | `number` |  | From 0 to 1: how much the sparks sway. Default `0.5`. |
| `heat` | `string` |  | The color of the burning edge, any CSS color. Default `oklch(0.82 0.18 65)`. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| EmberDissolve | `ember-dissolve` |  |  |  |

## Usage

Burn the photo when the viewer closes it.

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-pro/ember-dissolve @gelatin-ui/button
```

```tsx title="one-time-photo.tsx"
"use client";

import { useState } from "react";

import { EmberDissolve } from "@/components/pro/effects/ember-dissolve";
import { Button } from "@/components/ui/button";

export function OneTimePhoto() {
  const [burned, setBurned] = useState(false);
  return (
    <figure className="flex w-80 max-w-full flex-col gap-3 pt-24">
      <EmberDissolve
        src="/photos/ember-fox.webp"
        alt="A fire fox leaps over glowing embers"
        dissolved={burned}
        heat="oklch(0.78 0.19 45)"
        className="w-full"
      />
      <figcaption className="flex items-center justify-between gap-4 text-sm">
        This picture can be seen once
        <Button
          size="sm"
          variant="secondary"
          disabled={burned}
          onClick={() => {
            setBurned(true);
          }}
        >
          Burn
        </Button>
      </figcaption>
    </figure>
  );
}
```

## 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/ember-dissolve
```

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

- [Melt Dissolve](https://gelatinui.com/components/melt-dissolve.md)
- [Firework Dissolve](https://gelatinui.com/components/firework-dissolve.md)
- [Scratch Card](https://gelatinui.com/components/scratch-card.md)
- [Crumple to Delete](https://gelatinui.com/components/crumple-to-delete.md)

## Motion

| Part | Motion |
| --- | --- |
| Burn | heatPrint · 2.6s · a wavering hot line climbs, and each spark cools as it rises |
| Back | heatPrint · 2.6s · the sparks fall back and the line runs down |
