---
title: "Paper Relief Background"
description: "Terraces of stacked paper with real shadows that turn away from the hand."
url: https://gelatinui.com/components/paper-relief-background
markdown_url: https://gelatinui.com/components/paper-relief-background.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/paper-relief-background"
version: "2026-11-24"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Paper Relief Background

> Terraces of stacked paper with real shadows that turn away from the hand.

Page: https://gelatinui.com/components/paper-relief-background

## When to use it

Best for: A hand-made hero: terraces of stacked paper whose soft shadows turn away from the hand.

- Use `sheets` (3 to 24) for how many sheets the land is cut from.
- Use `shadowLength`, `shadowStrength`, and `lightAngle` for the shadows and where the light comes from.
- Use `mask` (`top`, `bottom`, `edges`, or `radial`) to fade an edge into the page, and `maskSoftness` for the width of the fade.

## When not to use it

- For glowing contour lines in 3D, use [Contour Range Background](https://gelatinui.com/components/contour-range-background.md).
- For a chart where the sea rises and falls, use [Tide Map Background](https://gelatinui.com/components/tide-map-background.md).

## Notes for agents

- `pointer` is on by default: the hand is the lamp, so the shadows turn away from it. `follow` sets how much the hand takes over.
- Children sit on top of the moving picture. The root is `relative isolate overflow-hidden`: give it a height, or let a flex parent size it.
- `palette` takes CSS colors: the ground, the second ground, then the look colors. The default palette has its own light and dark values.
- It stops off screen and in a hidden tab. `paused` holds the frame, and `speed={0}` shows a still frame.
- With no WebGL2 the box stays empty. Set `fallback` to show a CSS gradient of the palette there, on the server, and before the first frame.

## Anatomy

```text
PaperReliefBackground
```

## API reference

### PaperReliefBackground

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `palette` | `readonly string[]` | PALETTE | Any CSS colors (`var(--token)` too): the ground, the second ground, then the look colors. |
| `speed` | `number` |  | The time scale: 1 (default) is the designed speed, 0 a still frame. |
| `paused` | `boolean` |  | True holds the current frame. Default false. |
| `trigger` | `BackgroundTrigger` |  | When it moves: `loop` (default) or `hover`. It draws its first frame either way. |
| `seed` | `number` |  | Another seed gives another field of the same look. Default 0. |
| `press` | `boolean` |  | True: a press on the box sends a ripple through the field where it lands; a press on a button or a link inside does not. Default false. |
| `pointer` | `boolean` | true | True: the field leans toward a mouse or pen over the box. Default false. |
| `fps` | `number` |  | The most frames a second. Default: the display rate. |
| `resolution` | `number` |  | A last scale on the canvas pixels, after the caps (0.5 draws a quarter of them). Default 1. |
| `mask` | `"bottom" \| "edges" \| "none" \| "radial" \| "top"` |  | Fades an edge into the page: `radial`, `edges`, `top`, or `bottom`. Default `none`. |
| `vignette` | `number` |  | Darkens toward the corners, 0 to 1. Default 0. |
| `fallback` | `boolean` |  | True: a CSS gradient of the palette shows on the server, until the first WebGL frame, and with no WebGL. Default false: the box stays empty and the live picture fades in, because the gradient looks unlike the real effect and the swap reads as a glitch. |
| `landScale` | `number` | 2.8 | How many landforms fit the box height. More gives smaller hills. From 0.5 to 8. Default 2.8. |
| `ridges` | `number` | 0.8 | How tall and sharp the mountain ridges are against the plains. From 0 to 1.5. Default 0.8. |
| `bend` | `number` | 1.1 | How much the land twists, from straight folds to winding valleys. From 0 to 2.5. Default 1.1. |
| `detail` | `number` | 0.5 | The small wobble in every line. From 0 to 1. Default 0.5. |
| `morph` | `number` | 0.12 | How fast the land reshapes over time. 0 keeps it still. From 0 to 2. Default 0.12. |
| `sheets` | `number` | 10 | How many sheets of card the land is cut from. A whole number from 3 to 24. Default 10. |
| `shadowLength` | `number` | 21 | How far each sheet casts its shadow, in CSS px. From 0 to 60. Default 21. |
| `shadowStrength` | `number` | 0.42 | How dark the shadows are. From 0 to 1. Default 0.42. |
| `edgeLight` | `number` | 0.6 | How bright the cut edge of each sheet catches the light. From 0 to 1. Default 0.6. |
| `paperGrain` | `number` | 0.035 | How much paper fiber shows on the sheets. From 0 to 0.15. Default 0.035. |
| `lightAngle` | `number` | 225 | Where the light comes from, in degrees clockwise from the right. From 0 to 360. Default 225. |
| `follow` | `number` | 0.85 | How much the hand takes over as the lamp. Needs the pointer on. From 0 to 1. Default 0.85. |
| `maskSoftness` | `number` | 0.25 | The share of the box the mask fade takes, from 0.05 to 0.6. Default 0.25. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| PaperReliefBackground | `paper-relief-background` |  | `--paper-relief-bg`, `--paper-relief-bg-2`, `--paper-relief-color-1`, `--paper-relief-color-2`, `--paper-relief-color-3`, `--paper-relief-color-4`, `--paper-relief-color-5`, `--paper-relief-color-6` |  |

## Usage

Put the hero content inside as children: they sit on top of the moving picture. Give the root a height.

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/paper-relief-background @gelatin-ui/button
```

```tsx title="paper-relief-hero.tsx"
import { PaperReliefBackground } from "@/components/pro/backgrounds/paper-relief-background";
import { Button } from "@/components/ui/button";

export function PaperReliefHero() {
  return (
    <PaperReliefBackground
      sheets={12}
      className="flex h-[560px] flex-col items-center justify-center gap-6 px-6 text-center"
    >
      <p className="text-sm text-muted-foreground">Fold & Co.</p>
      <h1 className="max-w-2xl text-5xl font-light tracking-tight">
        Relief maps, cut by hand
      </h1>
      <p className="max-w-md text-muted-foreground">
        Notebooks, cards, and maps cut in our studio in Bath.
      </p>
      <Button size="lg">Visit the shop</Button>
    </PaperReliefBackground>
  );
}
```

## 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/paper-relief-background
```

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

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

- [Contour Range Background](https://gelatinui.com/components/contour-range-background.md)
- [Tide Map Background](https://gelatinui.com/components/tide-map-background.md)
- [Terrain Flyover Background](https://gelatinui.com/components/terrain-flyover-background.md)

## Motion

| Part | Motion |
| --- | --- |
| Show | chart · 600ms · ease-panel · the picture fades in after its first drawn frame |
| Loop | progress · the picture moves on its own clock at one speed; `speed` scales it, and 0 shows a still frame |
