---
title: "Bubble Dissolve"
description: "A picture that floats away as soap bubbles that grow and pop. Use it for a light, playful removal."
url: https://gelatinui.com/components/bubble-dissolve
markdown_url: https://gelatinui.com/components/bubble-dissolve.md
access: free
install: "npx shadcn@latest add @gelatin-ui/bubble-dissolve"
registry_item: https://gelatinui.com/r/bubble-dissolve.json
version: "2026-11-18"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Bubble Dissolve

> A picture that floats away as soap bubbles that grow and pop. Use it for a light, playful removal.

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

## When to use it

Best for: A playful goodbye for a light picture, with pieces that rise and pop.

- Leave free space above the picture: the bubbles rise almost a full box higher.
- Set `tint` to match your brand or the mood of the picture.
- Raise `turbulence` for a wobblier climb.

## When not to use it

- For pieces that fall instead of rise, use [Snow Dissolve](https://gelatinui.com/components/snow-dissolve.md).
- For flashes that stay in place, use [Sparkle Dissolve](https://gelatinui.com/components/sparkle-dissolve.md).

## Notes for agents

- The bottom edge lets go first, and each piece grows as it climbs.
- A bubble turns pale toward `tint`, then pops with a short fade near the end of its run.
- Pieces are 4 px by default, a little larger than most of these effects, so each bubble reads.
- At 2.6 s it is a slow effect: do not make people wait on it before the next step.

## Anatomy

```text
BubbleDissolve
```

## API reference

### BubbleDissolve

| 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 bubbles take to rise, in ms. Default `2600`. |
| `turbulence` | `number` |  | From 0 to 1: how far the bubbles wobble. Default `0.5`. |
| `tint` | `string` |  | The pale color of the bubbles, any CSS color. Default `oklch(0.95 0.04 220)`. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| BubbleDissolve | `bubble-dissolve` |  |  |  |

## Usage

Let a moodboard picture float off the board.

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

```tsx title="moodboard-tile.tsx"
"use client";

import { useState } from "react";

import { BubbleDissolve } from "@/components/effects/bubble-dissolve";
import { Button } from "@/components/ui/button";

export function MoodboardTile() {
  const [released, setReleased] = useState(false);
  return (
    <div className="flex w-72 max-w-full flex-col gap-3 pt-40">
      <BubbleDissolve
        src="/photos/ink-bloom.webp"
        alt="Ink blooming in water"
        dissolved={released}
        tint="oklch(0.9 0.08 350)"
        className="w-full"
      />
      <Button variant="secondary" size="sm" onClick={() => setReleased((value) => !value)}>
        {released ? "Catch it" : "Let go"}
      </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/bubble-dissolve
```

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

- [Ripple Dissolve](https://gelatinui.com/components/ripple-dissolve.md)
- [Sparkle Dissolve](https://gelatinui.com/components/sparkle-dissolve.md)
- [Snow Dissolve](https://gelatinui.com/components/snow-dissolve.md)
- [Parallax Image](https://gelatinui.com/components/parallax-image.md)

## Motion

| Part | Motion |
| --- | --- |
| Out | heatPrint · 2.6s · bubbles rise from the bottom edge, wobble, grow pale, and pop |
| Back | heatPrint · 2.6s · the bubbles sink and shrink back into the picture |
