FX · Backgrounds

Slanted rain streaking down behind content.

Stormy weather

bash
npx shadcn@latest add https://www.rad-ui.com/r/rain.json
React
import Rain from "@/components/fx/rain" <Rain className="px-8 py-24"> <h2>Your content</h2> </Rain>
  • 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) shows a still sheet of streaks.
PropTypeDefaultDescription
count
number
70

Number of drops.

color
string
indigo, 55%

Drop colour.

angle
number
12

Slant in degrees.

seed
number
2

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.