---
title: "Warp Dissolve"
description: "Jump a picture to light speed. Its pixels stretch into bright streaks from the middle and race past the viewer."
url: https://gelatinui.com/components/warp-dissolve
markdown_url: https://gelatinui.com/components/warp-dissolve.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/warp-dissolve"
version: "2026-11-18"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Warp Dissolve

> Jump a picture to light speed. Its pixels stretch into bright streaks from the middle and race past the viewer.

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

## When to use it

Best for: A move forward to the next place, when the exit should feel fast and far.

- Use it on forward actions, such as Next, Jump, or Launch.
- Start the next screen in `onDissolveEnd`.
- Pass `origin` to fly toward a point other than the middle.

## When not to use it

- To pull everything into one point, use [Vortex Dissolve](https://gelatinui.com/components/vortex-dissolve.md).
- For a push from the place of a press, use [Burst Dissolve](https://gelatinui.com/components/burst-dissolve.md).

## Notes for agents

- Streaks grow outward past every side of the box. A parent with `overflow-hidden` cuts them.
- `tint` sets the color of the streaks.
- `force` sets how far the streaks fly.
- The picture thins out as the streaks grow, so content under it shows through near the end.

## Anatomy

```text
WarpDissolve
```

## API reference

### WarpDissolve

| 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 jump takes, in ms. Default `1800`. |
| `force` | `number` |  | How far the grains streak out. Default `1`. |
| `tint` | `string` |  | The color of the streaks, any CSS color. Default `oklch(0.95 0.03 250)`. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| WarpDissolve | `warp-dissolve` |  |  |  |

## Usage

Jump, then show the next destination when the streaks are gone.

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

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

import { useState } from "react";

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

export function DestinationCard({ onArrive }: { onArrive: () => void }) {
  const [jumping, setJumping] = useState(false);
  return (
    <div className="flex w-80 max-w-full flex-col gap-3">
      <WarpDissolve
        src="/photos/sea-stacks.webp"
        alt="Sea stacks off a cliff coast"
        dissolved={jumping}
        tint="oklch(0.9 0.06 230)"
        className="w-full"
        onDissolveEnd={onArrive}
      />
      <Button
        disabled={jumping}
        onClick={() => {
          setJumping(true);
        }}
      >
        Jump to the next stop
      </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-pro/warp-dissolve
```

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

- [Vortex Dissolve](https://gelatinui.com/components/vortex-dissolve.md)
- [Burst Dissolve](https://gelatinui.com/components/burst-dissolve.md)
- [Starfield](https://gelatinui.com/components/starfield.md)
- [Zoom Reveal](https://gelatinui.com/components/zoom-reveal.md)

## Motion

| Part | Motion |
| --- | --- |
| Jump | reactionFloat · 1.8s · pixels speed up from the middle, stretch, grow, and fade |
| Back | reactionFloat · 1.8s · the streaks pull in and the picture forms |
