---
title: "Ripple Dissolve"
description: "A picture that ripples away like water after a pebble drops in. Use it to clear a calm, light thing."
url: https://gelatinui.com/components/ripple-dissolve
markdown_url: https://gelatinui.com/components/ripple-dissolve.md
access: free
install: "npx shadcn@latest add @gelatin-ui/ripple-dissolve"
registry_item: https://gelatinui.com/r/ripple-dissolve.json
version: "2026-11-18"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Ripple Dissolve

> A picture that ripples away like water after a pebble drops in. Use it to clear a calm, light thing.

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

## When to use it

Best for: A soft removal for calm pictures, with one ring that spreads like water.

- Set `origin="press"` to drop the pebble where the person taps.
- Raise `amplitude` for tall crests, or lower it with a longer `duration` for still water.
- Use a picture with open areas: the ring reads best on sky, sea, or sand.

## When not to use it

- For a hard throw from the same point, use [Burst Dissolve](https://gelatinui.com/components/burst-dissolve.md).
- For pieces that float upward, use [Bubble Dissolve](https://gelatinui.com/components/bubble-dissolve.md).

## Notes for agents

- The ring starts in the middle unless `origin` moves it.
- A grain rises on the crest, drifts outward, then sinks away as it shrinks.
- `amplitude` runs from 0 to 2 and sets both the crest and the drift.
- The grains pass the box by about 15% on each side, so a small gap around it is enough.

## Anatomy

```text
RippleDissolve
```

## API reference

### RippleDissolve

| 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 ring takes to clear the picture, in ms. Default `1800`. |
| `amplitude` | `number` |  | From 0 to 2: how high the crest lifts the grains and how far they drift. Default `1`. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| RippleDissolve | `ripple-dissolve` |  |  |  |

## Usage

Drop the pebble where the person taps the photo.

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

```tsx title="shoreline-card.tsx"
"use client";

import { useState } from "react";

import { RippleDissolve } from "@/components/effects/ripple-dissolve";
import { Button } from "@/components/ui/button";

export function ShorelineCard() {
  const [cleared, setCleared] = useState(false);
  return (
    <div className="grid w-80 max-w-full gap-3">
      <RippleDissolve
        src="/photos/quiet-beach.webp"
        alt="A quiet beach with turquoise water"
        origin="press"
        amplitude={1.3}
        dissolved={cleared}
        className="w-full cursor-pointer"
        onClick={() => setCleared(true)}
      />
      <Button variant="ghost" size="sm" onClick={() => setCleared((value) => !value)}>
        {cleared ? "Calm the water" : "Clear"}
      </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/ripple-dissolve
```

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

- [Burst Dissolve](https://gelatinui.com/components/burst-dissolve.md)
- [Bubble Dissolve](https://gelatinui.com/components/bubble-dissolve.md)
- [Parallax Image](https://gelatinui.com/components/parallax-image.md)
- [Mask Reveal](https://gelatinui.com/components/mask-reveal.md)

## Motion

| Part | Motion |
| --- | --- |
| Out | reactionFloat · 1.8s · a ring crosses the picture and each grain bobs once, drifts, and sinks |
| Back | reactionFloat · 1.8s · the ring runs inward and the water settles |
