uibrik

Light Rain

Preview

Customize

Colors
Density1.00
Spread1.00
Glints1.00
Glint spacing1.00
Haze1.00
Intensity1.00
down
Speed1.0
Grain0.020
Seed0
Radius160px
Follow0.70

Usage

import { LightRain } from "@/components/uibrik/light-rain/light-rain";

<LightRain />

Installation

npx shadcn@latest add https://uibrik.com/r/light-rain.json
Adds the files to components/uibrik/light-rain. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/light-rain.

Props

LightRain
colors
Type string[]
["#000000","#071a46","#1c4fb8","#6ea6ff","#eef5ff"]
Dark to bright: the light is mapped through these, blended in OKLCH.
density
Type number
1
How many lines.
spread
Type number
1
How wide the band of lines is.
glints
Type number
1
How many bright glints slide along the lines.
glintLength
Type number
1
Spacing of the glints along a line; larger is fewer.
haze
Type number
1
Soft glow drifting between the lines.
intensity
Type number
1
Brightness.
direction
Type "down" | "up"
"down"
Which way the light moves.
speed
Type number
1
Animation speed; 1 is the designed pace.
grain
Type number
0.02
Film grain strength.
seed
Type number
0
Shifts the composition, so two backgrounds with the same settings still differ.
animate
Type boolean
true
Move on its own. Off draws one still frame.
interactive
Type boolean
true
React to the pointer.
radius
Type number
160
How far the pointer light reaches.
follow
Type number
0.7
How lazily it follows the pointer, 0 (locked) to 1 (drifts after it).
children
Type ReactNode
–
Content shown on top of the background.
className
Type string
–
Classes for the box; it fills whatever size you give it.