FX · Backgrounds

Soft clouds sailing slowly across.

Head in the clouds

bash
npx shadcn@latest add https://www.rad-ui.com/r/drift-clouds.json
React
import DriftClouds from "@/components/fx/drift-clouds" <DriftClouds className="px-8 py-24"> <h2>Your content</h2> </DriftClouds>
  • 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) parks each cloud at its own spot.
PropTypeDefaultDescription
count
number
7

Number of clouds.

color
string
slate, 22%

Cloud colour.

speed
number
40

Seconds to cross. Higher is calmer.

seed
number
4

Change for a different, stable sky.

paused
boolean
false

Stop the animation. It also pauses offscreen.

...props
ComponentProps<'div'>
—

Passed to the root div; children render above.