---
title: "Curtain Dissolve"
description: "Open a picture like a stage curtain. It parts in the middle, and two folded halves slide away to show what is behind."
url: https://gelatinui.com/components/curtain-dissolve
markdown_url: https://gelatinui.com/components/curtain-dissolve.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/curtain-dissolve"
version: "2026-11-18"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Curtain Dissolve

> Open a picture like a stage curtain. It parts in the middle, and two folded halves slide away to show what is behind.

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

## When to use it

Best for: A reveal: the picture is the cover, and the real content waits behind it.

- Put the content under it in the same box, so the opening shows it.
- Set `amplitude` for deeper or flatter folds.
- Lower `force` to keep the halves nearer to the box.

## When not to use it

- For slats that close in place, use [Blinds Dissolve](https://gelatinui.com/components/blinds-dissolve.md).
- To reveal a picture as the page scrolls, use [Mask Reveal](https://gelatinui.com/components/mask-reveal.md).

## Notes for agents

- It always opens from the vertical middle, so this item has no `origin`.
- The halves slide past the sides of the box. A parent with `overflow-hidden` crops them to a clean reveal.
- Give it `absolute inset-0 size-full` to cover the content below it.
- Press and pointer events reach the root while it is open, so set `pointer-events-none` on it after the reveal.

## Anatomy

```text
CurtainDissolve
```

## API reference

### CurtainDissolve

| 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 curtain takes to open, in ms. Default `1800`. |
| `force` | `number` |  | How far the two halves slide. Default `1`. |
| `amplitude` | `number` |  | From 0 to 2: how deep the folds are. Default `1`. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| CurtainDissolve | `curtain-dissolve` |  |  |  |

## Usage

Cover the trailer, then open the curtain to show it.

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

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

import { useState } from "react";

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

export function PremiereCard() {
  const [open, setOpen] = useState(false);
  return (
    <section className="flex w-full max-w-md flex-col gap-3">
      <div className="relative aspect-video overflow-hidden rounded-xl bg-muted">
        <video src="/films/ocean-trailer.mp4" controls={open} className="size-full object-cover" />
        <CurtainDissolve
          src="/photos/ocean-poster.webp"
          alt="A wave under a grey sky"
          dissolved={open}
          className={open ? "pointer-events-none absolute inset-0 size-full" : "absolute inset-0 size-full"}
        />
      </div>
      <Button
        onClick={() => {
          setOpen((value) => {
            return !value;
          });
        }}
      >
        {open ? "Close curtain" : "Open curtain"}
      </Button>
    </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/curtain-dissolve
```

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

- [Flag Dissolve](https://gelatinui.com/components/flag-dissolve.md)
- [Blinds Dissolve](https://gelatinui.com/components/blinds-dissolve.md)
- [Mask Reveal](https://gelatinui.com/components/mask-reveal.md)
- [Zoom Reveal](https://gelatinui.com/components/zoom-reveal.md)

## Motion

| Part | Motion |
| --- | --- |
| Open | reactionFloat · 1.8s · the middle parts first, and both folded halves slide out |
| Close | reactionFloat · 1.8s · the halves meet in the middle again |
