FX · Backgrounds

Snowflakes drifting down and swaying.

Let it snow

bash
npx shadcn@latest add https://www.rad-ui.com/r/snowfall.json
React
import Snowfall from "@/components/fx/snowfall" <Snowfall className="px-8 py-24"> <h2>Your content</h2> </Snowfall>
  • 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) leaves the flakes resting, scattered.
PropTypeDefaultDescription
count
number
60

Number of flakes.

color
string
'#f8fafc'

Flake colour.

seed
number
9

Change for a different, stable pattern.

paused
boolean
false

Stop the animation. It also pauses offscreen.

...props
ComponentProps<'div'>
—

Passed to the root div; children render above.