---
title: "Terrain Flyover Background"
description: "A lit landscape of soft hills you fly over toward a horizon."
url: https://gelatinui.com/components/terrain-flyover-background
markdown_url: https://gelatinui.com/components/terrain-flyover-background.md
access: free
install: "npx shadcn@latest add @gelatin-ui/terrain-flyover-background"
registry_item: https://gelatinui.com/r/terrain-flyover-background.json
version: "2026-11-24"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Terrain Flyover Background

> A lit landscape of soft hills you fly over toward a horizon.

Page: https://gelatinui.com/components/terrain-flyover-background

## When to use it

Best for: A hero that feels like a journey: you fly over lit hills toward a hazy horizon.

- Use `horizon` (0.2 to 0.7) to set where the horizon sits, so the heading sits in the sky.
- Use `ridges` and `height` for round or sharp, low or tall hills, and `fly` for the speed.
- 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 a 3D range drawn in contour lines, use [Contour Range Background](https://gelatinui.com/components/contour-range-background.md).
- For a flight over clouds, use [Cloud Sea Background](https://gelatinui.com/components/cloud-sea-background.md).

## Notes for agents

- The flight runs on its own: no pointer or press is on by default.
- 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
TerrainFlyoverBackground
```

## API reference

### TerrainFlyoverBackground

| 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: 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. |
| `ridges` | `number` | 0.45 | How sharp the hill tops are, from round (0) to ridged (1). From 0 to 1. Default 0.45. |
| `height` | `number` | 0.45 | How tall the hills are. From 0.1 to 1. Default 0.45. |
| `horizon` | `number` | 0.4 | Where the horizon sits, as a share of the height from the top. From 0.2 to 0.7. Default 0.4. |
| `fly` | `number` | 0.6 | How fast the view flies forward. From 0 to 2. Default 0.6. |
| `toneLow` | `number` | 0 | The field light that reads as no tone. From 0 to 1. Default 0. |
| `toneHigh` | `number` | 1 | The field light that reads as full tone. From 0 to 1. Default 1. |
| `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 |
| --- | --- | --- | --- | --- |
| TerrainFlyoverBackground | `terrain-flyover-background` |  | `--terrain-flyover-bg`, `--terrain-flyover-bg-2`, `--terrain-flyover-color-1`, `--terrain-flyover-color-2`, `--terrain-flyover-color-3` |  |

## 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/terrain-flyover-background @gelatin-ui/button
```

```tsx title="terrain-flyover-hero.tsx"
import { TerrainFlyoverBackground } from "@/components/backgrounds/terrain-flyover-background";
import { Button } from "@/components/ui/button";

export function TerrainFlyoverHero() {
  return (
    <TerrainFlyoverBackground
      horizon={0.45}
      className="flex h-[560px] flex-col items-center justify-start pt-24 gap-6 px-6 text-center"
    >
      <p className="text-sm text-muted-foreground">Trailmap 2.0</p>
      <h1 className="max-w-2xl text-5xl font-light tracking-tight">
        Every trail, from above
      </h1>
      <p className="max-w-md text-muted-foreground">
        Offline maps, live weather, and 40,000 routes.
      </p>
      <Button size="lg">Plan a route</Button>
    </TerrainFlyoverBackground>
  );
}
```

## 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/terrain-flyover-background
```

It adds 50 registry items: 50 files, 7749 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

- [Cloud Sea Background](https://gelatinui.com/components/cloud-sea-background.md)
- [Contour Range Background](https://gelatinui.com/components/contour-range-background.md)
- [Paper Relief Background](https://gelatinui.com/components/paper-relief-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 |
