---
title: "Tide Map Background"
description: "A sea floods and leaves a contour map, with a bright moving shore."
url: https://gelatinui.com/components/tide-map-background
markdown_url: https://gelatinui.com/components/tide-map-background.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/tide-map-background"
version: "2026-11-24"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Tide Map Background

> A sea floods and leaves a contour map, with a bright moving shore.

Page: https://gelatinui.com/components/tide-map-background

## When to use it

Best for: A coastal or sailing hero: a chart where the sea rises and falls over the land.

- Use `seaLevel`, `tideRange`, and `tideRate` for the middle height of the sea, how far it moves, and how fast.
- Use `depthLines` for the depth lines in the sea; 0 removes them.
- 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 weather chart of pressure lines, use [Isobar Chart Background](https://gelatinui.com/components/isobar-chart-background.md).
- For rows of swells set in type, use [Glyph Tide Background](https://gelatinui.com/components/glyph-tide-background.md).

## Notes for agents

- `pointer` and `press` are on by default: the hand pushes the water back (`lift`, `reach`), and a press sends a ring across it.
- 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
TideMapBackground
```

## API reference

### TideMapBackground

| 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 | 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` | 3.2 | How many landforms fit the box height. More gives smaller hills. From 0.5 to 8. Default 3.2. |
| `ridges` | `number` | 0.7 | How tall and sharp the mountain ridges are against the plains. From 0 to 1.5. Default 0.7. |
| `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.08 | How fast the land reshapes over time. 0 keeps it still. From 0 to 2. Default 0.08. |
| `contours` | `number` | 44 | How many land contours one unit of height holds. From 8 to 90. Default 44. |
| `lineWidth` | `number` | 0.75 | The width of a land contour, in CSS px. From 0.4 to 3. Default 0.75. |
| `indexEvery` | `number` | 5 | Which land contours draw stronger: every fifth at 5. A whole number from 2 to 10. Default 5. |
| `seaLevel` | `number` | 0.16 | The middle height of the sea. Higher floods more land. From -0.1 to 0.5. Default 0.16. |
| `tideRange` | `number` | 0.055 | How far the sea rises and falls around its middle height. From 0 to 0.2. Default 0.055. |
| `tideRate` | `number` | 0.32 | How fast the tide comes in and goes out. From 0 to 2. Default 0.32. |
| `shoreWidth` | `number` | 2.2 | The width of the bright shore line, in CSS px. From 0.5 to 6. Default 2.2. |
| `depthLines` | `number` | 70 | How many depth lines one unit of depth holds. 0 removes them. From 0 to 140. Default 70. |
| `drift` | `number` | 0.008 | How fast the land slides under the chart. From 0 to 0.2. Default 0.008. |
| `lift` | `number` | 0.09 | How far the hand pushes the water back. Needs the pointer on. From 0 to 0.3. Default 0.09. |
| `reach` | `number` | 0.18 | How wide the push of the hand is, as a share of the box height. From 0.04 to 0.5. Default 0.18. |
| `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 |
| --- | --- | --- | --- | --- |
| TideMapBackground | `tide-map-background` |  | `--tide-map-bg`, `--tide-map-bg-2`, `--tide-map-color-1`, `--tide-map-color-2`, `--tide-map-color-3`, `--tide-map-color-4`, `--tide-map-color-5` |  |

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

```tsx title="tide-map-hero.tsx"
import { TideMapBackground } from "@/components/pro/backgrounds/tide-map-background";
import { Button } from "@/components/ui/button";

export function TideMapHero() {
  return (
    <TideMapBackground
      tideRate={0.5}
      className="flex h-[560px] flex-col items-center justify-center gap-6 px-6 text-center"
    >
      <p className="text-sm text-muted-foreground">Harbor Charts</p>
      <h1 className="max-w-2xl text-5xl font-light tracking-tight">
        Tides, depths, and safe water
      </h1>
      <p className="max-w-md text-muted-foreground">
        Live charts for 3,000 harbors, on deck and offline.
      </p>
      <Button size="lg">Open the chart</Button>
    </TideMapBackground>
  );
}
```

## 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/tide-map-background
```

It adds 51 registry items: 51 files, 7924 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

- [Isobar Chart Background](https://gelatinui.com/components/isobar-chart-background.md)
- [Contour Range Background](https://gelatinui.com/components/contour-range-background.md)
- [Glyph Tide Background](https://gelatinui.com/components/glyph-tide-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 |
