Sections / Gems / Generative backgrounds

Dunes

An aerial field of wind-cut dunes behind your hero, in your own three colours. Gentle windward slopes, steep slip faces, wandering crests, and fine ripples that run over the windward sides and creep downwind, under a low sun that swings slowly round so the light on every face keeps changing. The pointer is the wind: move it and the ripples race, a haze of blown sand lifts behind it, and the field slowly turns to face the way you blew.

Included with Everything
Open the demo
Dunes: six frames of the gem in motion
Kind
Generative backgrounds
Interaction
autoplay · pointer wind · generative · WebGL · pause button · seeded
Dependencies
None
Licence
Licensed with Full Access, for the sites you build; do not resell the gem itself

Formats

  • Webflow (native)
  • Figma (layers)
  • Framer component
  • HTML
  • Prompts for Claude Code, Cursor, Lovable, v0, Bolt

Copy to Webflow pastes a native section with the gem in an Embed inside it. Copy to Figma pastes a frame of its best moment, text and controls as layers. Copy to Framer pastes a component with its options as controls. HTML is one self-contained snippet. Each prompt (Claude Code, Cursor, Lovable, v0, Bolt) carries the exact files, so your agent installs this gem, not a lookalike. With the MCP server, ask your agent for get_section("dunes").

Behaviour and accessibility

  • The sun drifts and the ripples creep while the hero is on screen; the pause button (labelled) stops it, and it stops drawing entirely off screen or in a background tab.
  • Moving the mouse or pen blows the sand; touch screens get the drifting light without the gust.
  • With prefers-reduced-motion: one still frame of the dunes, no drift, no wind, no pause button.
  • The canvas is decoration (aria-hidden); with no WebGL it falls back to a still gradient in your palette.
  • Anything you put inside the element (a headline, buttons) sits above the sand in a .dun-content layer.

Options

OptionTypeDefaultWhat
palette[string, string, string]3 built inThree colours: the shadow, the sand, the sunlight.
scalenumber420Size of the dunes: px from one crest to the next, roughly.
reliefnumber1Height of the relief: 1 is a calm erg, 2 a steep one.
speednumber1Time scale: 1 is slow drift, 2 twice as fast.
pointerbooleantrueThe pointer blows the sand (mouse and pen).
controlsbooleantrueShow the pause button.
seednumber5Seed for the dune field: the same seed gives the same desert.
onPause(paused: boolean) => voidCalled when the wind is paused or played with the button or the handle.