---
title: "Glitch Dissolve"
description: "Break a picture like a failing video signal. Horizontal slices jump sideways in hard steps, take a color, and cut out."
url: https://gelatinui.com/components/glitch-dissolve
markdown_url: https://gelatinui.com/components/glitch-dissolve.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/glitch-dissolve"
version: "2026-11-18"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Glitch Dissolve

> Break a picture like a failing video signal. Horizontal slices jump sideways in hard steps, take a color, and cut out.

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

## When to use it

Best for: Lost connections and media tiles, where the exit should feel sudden and electronic.

- Use it on a small or medium tile, for a short event.
- Tie `dissolved` to the connection state of a stream.
- Set `tint` to match the accent color of the page.

## When not to use it

- For a calm line that reads the page, use [Scan Dissolve](https://gelatinui.com/components/scan-dissolve.md).
- For retro game blocks, use [Pixel Dissolve](https://gelatinui.com/components/pixel-dissolve.md).

## Notes for agents

- The color of each slice changes fast. Keep the picture small, and do not use it full screen.
- Slices leave in a random order, so this item has no `origin`.
- `strips` sets the number of slices, 18 by default. `amplitude` sets how far they jump.
- Slices cut out with no fade, and they stay within the height of the box.

## Anatomy

```text
GlitchDissolve
```

## API reference

### GlitchDissolve

| 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. |
| `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 signal takes to drop, in ms. Default `1200`. |
| `strips` | `number` |  | How many slices the picture is cut into. Default `18`. |
| `amplitude` | `number` |  | From 0 to 2: how far the slices jump. Default `1`. |
| `tint` | `string` |  | The color of the signal noise, any CSS color. Default `oklch(0.7 0.25 330)`. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| GlitchDissolve | `glitch-dissolve` |  |  |  |

## Usage

Tie the effect to the state of the stream.

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

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

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

type StreamTileProps = { offline: boolean; onReconnect: () => void };

export function StreamTile({ offline, onReconnect }: StreamTileProps) {
  return (
    <div className="relative w-80 max-w-full">
      <GlitchDissolve
        src="/photos/dusk-synth.webp"
        alt="A synthesizer under dusk light"
        dissolved={offline}
        tint="oklch(0.72 0.2 200)"
        className="w-full"
      />
      {offline ? (
        <div className="absolute inset-0 grid place-items-center">
          <Button variant="outline" onClick={onReconnect}>
            Reconnect
          </Button>
        </div>
      ) : null}
    </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/glitch-dissolve
```

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

- [Pixel Dissolve](https://gelatinui.com/components/pixel-dissolve.md)
- [Scan Dissolve](https://gelatinui.com/components/scan-dissolve.md)
- [Frame Scrub](https://gelatinui.com/components/frame-scrub.md)
- [Mask Reveal](https://gelatinui.com/components/mask-reveal.md)

## Motion

| Part | Motion |
| --- | --- |
| Break | draw · 1.2s · slices jump sideways in eight hard steps, then cut out |
| Back | draw · 1.2s · slices jump back until the signal is clean |
