---
title: "Layered Scene"
description: "A hero landscape of drawn layers (sky, sun, ridges, trees) that move at their own speeds as the page scrolls and drift with the mouse."
url: https://gelatinui.com/components/layered-scene
markdown_url: https://gelatinui.com/components/layered-scene.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/layered-scene"
version: "2026-11-10"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Layered Scene

> A hero landscape of drawn layers (sky, sun, ridges, trees) that move at their own speeds as the page scrolls and drift with the mouse.

Page: https://gelatinui.com/components/layered-scene

## When to use it

Best for: A drawn hero landscape behind a headline, with depth from the scroll and the mouse.

- Put the headline and the actions in as children: they stay on the page and the planes move behind them.
- Keep `range="page"` (default) for a hero at the top; use `range="view"` for a scene further down.
- Add `pointer` to let the planes drift with the mouse.
- Change `seed` for other ridges and trees; the same seed draws the same scene.
- Set `fade={false}` for a scene in a framed box with its own edge.

## When not to use it

- For your own pictures as layers, use [Parallax](https://gelatinui.com/components/parallax.md).
- For a photo that moves slower than the page, use [Parallax Image](https://gelatinui.com/components/parallax-image.md).

## Notes for agents

- The planes are decoration (`aria-hidden`); the children are the real content.
- Colors are a clear day in light and a moonlit night in dark.
- The sun hides when the scene is under 28rem wide, because the copy fills the width there.
- Set the height with `className` (default 36rem). Pass `container` when the page scrolls in a box.
- It moves with `transform` only, and the work stops off screen.

## Anatomy

```text
LayeredScene
```

## API reference

### LayeredScene

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `range` | `"page" \| "pin" \| "view"` | "page" | Where the scroll source counts from: `view` (default, the item's own pass through the view), `page` (the page scroll from its top, for a hero), or `pin` (the px a tall section with a sticky stage has pinned). See `PARALLAX_RANGES`. |
| `container` | `RefObject<HTMLElement \| null>` |  | The scroll box, when the item scrolls inside one and not with the page. |
| `pointer` | `boolean` |  | Adds the pointer source: the layers drift toward the mouse over the item. Default false. |
| `disabled` | `boolean` |  | Rests every layer and stops the work. |
| `seed` | `number` | 7 | The seed of the ridges and trees: the same seed draws the same scene. Default 7. |
| `fade` | `boolean` | true | Fades the bottom of the scene into the page color. Default true. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| LayeredScene | `layered-scene` |  |  |  |

## Usage

Put the headline in the scene.

```tsx title="landing-hero.tsx"
import { LayeredScene } from "@/components/pro/backgrounds/layered-scene";

export function LandingHero() {
  return (
    <LayeredScene pointer>
      <h1 className="text-5xl font-medium">Plan the trip, not the paperwork</h1>
    </LayeredScene>
  );
}
```

## 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/layered-scene
```

It adds 23 registry items: 22 files, 3727 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 Pattern](https://gelatinui.com/components/parallax-pattern.md)
- [Parallax Wall](https://gelatinui.com/components/parallax-wall.md)

## Accessibility

The planes are hidden from screen readers; the children stay in the reading order.

## Motion

| Part | Motion |
| --- | --- |
| Planes | none · each plane follows the scroll at its own speed in the same frame, with no easing |
| Pointer | none · with `pointer`, each plane drifts toward the mouse at its own depth |
