Contour
Hairline contour lines flowing over a slowly breathing terrain.

import { Contour } from "@/components/contour";
export function Hero() {
return (
<Contour className="flex h-[560px] items-end p-10" palette="terrain">
<h1 className="text-5xl font-semibold tracking-tight text-white">
Your headline
</h1>
</Contour>
);
}
Installation
pnpm dlx shadcn@latest add @gradients-pro/contourNeeds a Pro account and the Pro registry setup.
Usage
import { Contour } from "@/components/contour";
<Contour className="h-[560px]">{children}</Contour>;It fills its box, so give it a height. Children render on top.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
palette | "survey", "terrain", "thermal" | "survey" | One of the curated palettes. |
appearance | "auto", "dark", "light" | "auto" | Which version of the palette to use. auto follows a dark or light class (or data-theme) on <html>, then the OS setting. |
colors | string[] | palette | 2 to 6 CSS colours, var(--x) included. Replaces the palette's colours. |
background | string | palette | Replaces the palette's background. |
density | number | 1 | 0.25 to 4. How much terrain fits in the frame. |
rugged | number | 0.5 | 0 to 1. How rough the ground between the peaks is. |
softness | number | 0.5 | 0 to 1. Softer hill shading. |
grain | number | 0.08 | 0 to 1. Film grain. |
speed | number | 0.5 | 0 to 2. How fast it moves; 0 holds a still frame. |
params | Partial<GradientParams> | none | Any other engine param, applied last. |
className | string | none | Classes for the outer box. Give it a size, for example h-[560px]. |
style | CSSProperties | none | Inline styles for the outer box. |
children | ReactNode | none | Content drawn above the background. |