---
title: "Confetti Dissolve"
description: "Turn a paid order or a finished goal into a party. The image pops into paper pieces that flip and flutter down."
url: https://gelatinui.com/components/confetti-dissolve
markdown_url: https://gelatinui.com/components/confetti-dissolve.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/confetti-dissolve"
version: "2026-11-18"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Confetti Dissolve

> Turn a paid order or a finished goal into a party. The image pops into paper pieces that flip and flutter down.

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

## When to use it

Best for: A short thank-you moment after a payment, a win, or a finished task.

- Use it once, right after the success that earns it.
- Lower `turns` for slower flips, or raise it for a busy flutter.
- Raise `force` for a higher pop when the page has room.

## When not to use it

- For a night-sky launch and sparks, use [Firework Dissolve](https://gelatinui.com/components/firework-dissolve.md).
- For a removal that must feel serious, use [Ember Dissolve](https://gelatinui.com/components/ember-dissolve.md).

## Notes for agents

- Pieces are 5 px by default. Raise `grainSize` for larger paper.
- The pop goes up and out, then the pieces fall below the box. Leave free space on every side.
- The middle of the picture leaves first. `origin` moves that point.
- Drive `dissolved` from the success state of your app, so it plays once.

## Anatomy

```text
ConfettiDissolve
```

## API reference

### ConfettiDissolve

| 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 pieces take to land, in ms. Default `2600`. |
| `turns` | `number` |  | How many times a piece flips. Default `3`. |
| `force` | `number` |  | How high and wide the pop throws the pieces. Default `1`. |
| `gravity` | `number` |  | How fast the pieces come down. Default `1`. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| ConfettiDissolve | `confetti-dissolve` |  |  |  |

## Usage

Play it when the payment succeeds.

```tsx title="order-paid.tsx"
"use client";

import { ConfettiDissolve } from "@/components/pro/effects/confetti-dissolve";

export function OrderPaid({ paid }: { paid: boolean }) {
  return (
    <section className="flex w-80 max-w-full flex-col items-center gap-2 py-32 text-center">
      <ConfettiDissolve
        src="/photos/cafe.webp"
        alt="A sunny coffee shop with wooden tables"
        dissolved={paid}
        turns={4}
        className="w-full"
      />
      <h2 className="font-medium">{paid ? "Order #2048 is paid" : "Order #2048"}</h2>
      <p className="text-sm text-muted-foreground">Coffee for two</p>
    </section>
  );
}
```

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

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

- [Firework Dissolve](https://gelatinui.com/components/firework-dissolve.md)
- [Bubble Dissolve](https://gelatinui.com/components/bubble-dissolve.md)
- [Scratch Card](https://gelatinui.com/components/scratch-card.md)
- [Coin Flip](https://gelatinui.com/components/coin-flip.md)

## Motion

| Part | Motion |
| --- | --- |
| Pop and fall | heatPrint · 2.6s · pieces pop up, flip, and sway on the way down |
| Back | heatPrint · 2.6s · the pieces fly up and join the image |
