---
title: "Scan Dissolve"
description: "A picture read out line by line by a scanner, each row streaking out. Use it for a document that is sent or scanned."
url: https://gelatinui.com/components/scan-dissolve
markdown_url: https://gelatinui.com/components/scan-dissolve.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/scan-dissolve"
version: "2026-11-18"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Scan Dissolve

> A picture read out line by line by a scanner, each row streaking out. Use it for a document that is sent or scanned.

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

## When to use it

Best for: Documents and reports that are sent, scanned, or read by a tool.

- Use it on pages and forms, where rows of content match the motion.
- Set `tint` to your product color. The default is a scanner green.
- Lower `duration` for a fast pass on small previews.

## When not to use it

- For rows that close in place, use [Blinds Dissolve](https://gelatinui.com/components/blinds-dissolve.md).
- For a single push to one side, use [Broom Dissolve](https://gelatinui.com/components/broom-dissolve.md).

## Notes for agents

- Rows go from the top down, and neighbor rows leave to opposite sides.
- Each row lights in `tint` as the line reaches it, then stretches into a streak.
- Rows travel a full box width past each side: give it room or let the streaks run under the page edge.
- Set `origin="bottom"` to scan upward.

## Anatomy

```text
ScanDissolve
```

## API reference

### ScanDissolve

| 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 scan line takes to run down, in ms. Default `1800`. |
| `tint` | `string` |  | The color of the lit rows, any CSS color. Default `oklch(0.85 0.17 165)`. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| ScanDissolve | `scan-dissolve` |  |  |  |

## Usage

Scan the page out when the report is sent.

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

```tsx title="report-preview.tsx"
"use client";

import { useState } from "react";

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

export function ReportPreview() {
  const [sent, setSent] = useState(false);
  return (
    <div className="flex w-72 max-w-full flex-col gap-3">
      <ScanDissolve
        src="/photos/quarterly-report.webp"
        alt="The first page of a printed report"
        dissolved={sent}
        tint="oklch(0.82 0.16 75)"
        className="aspect-3/4 w-full"
      />
      <Button onClick={() => setSent((value) => !value)}>
        {sent ? "Scan in" : "Send report"}
      </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/scan-dissolve
```

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

- [Blinds Dissolve](https://gelatinui.com/components/blinds-dissolve.md)
- [Broom Dissolve](https://gelatinui.com/components/broom-dissolve.md)
- [Receipt Printer](https://gelatinui.com/components/receipt-printer.md)
- [Mask Reveal](https://gelatinui.com/components/mask-reveal.md)

## Motion

| Part | Motion |
| --- | --- |
| Out | reactionFloat · 1.8s · each row lights up and streaks out as the line passes |
| Back | reactionFloat · 1.8s · the rows slide in from both sides, bottom row first |
