FX · Backgrounds

Topographic contour rings around slowly wandering peaks.

Off the map

bash
npx shadcn@latest add https://www.rad-ui.com/r/contour-lines.json
React
import ContourLines from "@/components/fx/contour-lines" <ContourLines className="px-8 py-24"> <h2>Your content</h2> </ContourLines>
  • The effect layer is aria-hidden and ignores pointer events; only children are exposed.
  • Pauses offscreen; `paused` stops it on demand (wire it to a visible control if it runs behind reading content).
  • prefers-reduced-motion: reduce (or data-rad-fx-motion="reduce" on an ancestor) holds the contours still.
PropTypeDefaultDescription
color
string
emerald, 35%

Line colour.

spacing
number
18

Distance between lines in px.

speed
number
20

Seconds per drift cycle.

paused
boolean
false

Stop the animation. It also pauses offscreen.

...props
ComponentProps<'div'>
—

Passed to the root div; children render above.