---
title: "Zoom Reveal"
description: "A pinned hero where a photo grows from a small rounded window to the full view as you scroll, while the heading over it rises and fades."
url: https://gelatinui.com/components/zoom-reveal
markdown_url: https://gelatinui.com/components/zoom-reveal.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/zoom-reveal"
version: "2026-11-10"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Zoom Reveal

> A pinned hero where a photo grows from a small rounded window to the full view as you scroll, while the heading over it rises and fades.

Page: https://gelatinui.com/components/zoom-reveal

## When to use it

Best for: One hero photo or video that grows from a framed window to the full view as the page scrolls.

- Put a `ZoomRevealMedia` with an `Image` (`fill`) or a video, then a `ZoomRevealContent` with the heading.
- Set the start window with `inset` (% cut from each side) and `radius` (px), and the settle with `zoom`.
- Set the pin length with a height class on the root. The default is 2.5 views.
- In a scroll box, pass the box as `container` and set `--parallax-view` to its height.

## When not to use it

- For a photo that only moves a little slower than the page, use [Parallax Image](https://gelatinui.com/components/parallax-image.md).
- For a scene of several layers that move at their own speed, use [Parallax](https://gelatinui.com/components/parallax.md).

## Notes for agents

- The root is a `Parallax` with `range="pin"` and a sticky stage one view tall. The window grows over the first 80% of the pin and holds for the rest.
- The window is a `clip-path` inset, so the photo never stretches. The photo is `zoom` larger at the start and settles to its size.
- The scrim under the heading clears as the window grows. With `fade={false}`, turn the scrim off and add your own `scrimVariants` layer in the media, so the heading reads at every step.
- The heading is white (`text-white`) in both themes. Keep it inside the start window: outside it, it sits on the page color.
- The heading fades over the first 40% of the pin and then takes no clicks. A keyboard focus in it jumps the page back to the pin start (page scroll only, not in a `container`).
- `disabled` holds the start (the small window and the heading) with no scroll work.
- Under a sticky header, set `--parallax-pin-top` on a parent to the header height.

## Anatomy

```text
ZoomReveal
├─ ZoomRevealMedia (0..n)
└─ ZoomRevealContent (0..n)
```

## API reference

### ZoomReveal

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `container` | `RefObject<HTMLElement \| null>` |  | The scroll box, when the item scrolls inside one and not with the page. |
| `disabled` | `boolean` | false | Rests every layer and stops the work. |

### ZoomRevealMedia

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `inset` | `number` | 20 | The window at the start, in % of the screen cut from each side. Default 20. |
| `radius` | `number` | 24 | The window corner at the start, in px. It goes to 0 at the full screen. Default 24. |
| `zoom` | `number` | 0.15 | How much larger the picture is in the small window: 0.15 is 15%. It settles to 1. Default 0.15. |
| `scrim` | `boolean` | true | A dark dim over the picture while the heading is on it, so the heading reads; it clears as the window grows. Default true. Without it, give the heading its own backdrop. |

### ZoomRevealContent

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `speed` | `number` | 1 | How fast the content rises over the page, so it leaves before the picture: 1 is the designed speed, 0 holds it still. Default 1. |
| `fade` | `boolean` | true | Fades the content out over the first 40% of the pin. It takes no clicks once faded. Default true. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| ZoomReveal | `zoom-reveal` |  | `--parallax-pin-top`, `--parallax-view` |  |
| ZoomRevealMedia | `zoom-reveal-media` |  |  |  |
| ZoomRevealContent | `zoom-reveal-content` |  |  |  |

## Usage

Put the photo in the media part and the heading in the content part.

The sample also uses `image`, which this add does not write. One command adds them with this item:

```bash
npx shadcn@latest add @gelatin-ui-pro/zoom-reveal @gelatin-ui/image
```

```tsx title="trail-hero.tsx"
import {
  ZoomReveal,
  ZoomRevealContent,
  ZoomRevealMedia,
} from "@/components/pro/effects/zoom-reveal";
import { Image } from "@/components/ui/image";

export function TrailHero() {
  return (
    <ZoomReveal>
      <ZoomRevealMedia>
        <Image src="/mountains.webp" alt="Snowy peaks above the clouds" fill preload />
      </ZoomRevealMedia>
      <ZoomRevealContent>
        <h1 className="text-5xl font-medium tracking-tight">Above the clouds</h1>
      </ZoomRevealContent>
    </ZoomReveal>
  );
}
```

## 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/zoom-reveal
```

It adds 23 registry items: 22 files, 3717 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Parallax](https://gelatinui.com/components/parallax.md)

## 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

- [Parallax](https://gelatinui.com/components/parallax.md)
- [Parallax Image](https://gelatinui.com/components/parallax-image.md)
- [Image](https://gelatinui.com/components/image.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Tab | A focus in the faded heading scrolls the page back to the pin start, so the focused control shows. |

## Accessibility

The photo keeps its `alt`. The scrim is `aria-hidden`.

The heading stays in the reading order before the page that follows, and it keeps its controls.

## Motion

| Part | Motion |
| --- | --- |
| Scroll | none · the window, the zoom, and the heading follow the scroll in the same frame, with no easing |
