Skip to content

Dune Field

Layered dunes drift beneath fine ridges of warm light.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import DuneField from "./DuneField";
export default function Example() {
return (
<DuneField
color={"#b0805d"}
highlightColor={"#ebcba0"}
background={"#231b18"}
speed={18}
minHeight={400}
children={"A slower kind of motion."}
style={{
"color": "#f4e5d0",
"fontSize": 35,
"alignItems": "start",
"paddingTop": 55,
"letterSpacing": "-.05em"
}}
/>
);
}

Using Dune Field

Place a heading or other foreground content in children. Set minHeight to reserve the background area.

Use colour and highlight differences to define the dune ridges without making the entire section bright. speed changes the pace of the drifting layers.

Props

NameTypeRequiredDefaultDescription
colorstringNo"#bb8d66"Main dune colour.
highlightColorstringNo"#efd3a8"Ridge highlight and gradient colour.
backgroundstringNo"#211a18"Sky and shadow colour.
speednumberNo18One-way drift duration in seconds.
minHeightnumber | stringNo380Minimum container height in pixels or a CSS length.
childrenReactNodeNoundefinedOptional caller content above the landscape.
classNamestringNo""Additional classes merged with component styles.
styleCSSPropertiesNoundefinedInline styles for caller-defined sizing, typography, and appearance.

Related components

Lava Lamp

Backgrounds

Warm liquid forms merge and drift inside a softly lit glass lamp.

Helix Field

Backgrounds

Two strands of shaded particles rotate around fine connecting rungs.

Wave Lattice

Backgrounds

A fine perspective mesh drifts over a sculpted wave surface.

Kinetic Mobile

Backgrounds

Suspended discs, rings and counterweights sway on fine connecting rods.