# Light Rain

> Thin lines of blue light falling through the dark, with bright glints sliding along them.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Backgrounds › Backgrounds |
| Live preview | https://uibrik.com/components/light-rain |
| Writes | 1 files into `components/uibrik/light-rain/`, plus `components/uibrik/_shader-background/ShaderSurface.tsx` |
| Packages | none beyond React |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/light-rain.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/light-rain`.

Can't run commands? https://uibrik.com/components/light-rain/prompt-full.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

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

const colors = ["#000000", "#071a46", "#1c4fb8", "#6ea6ff", "#eef5ff"];

<LightRain
  colors={colors}
  density={1}
  spread={1}
  glints={1}
  glintLength={1}
  haze={1}
  intensity={1}
  direction="down"
  speed={1}
  grain={0.02}
  animate
  interactive
  radius={160}
  follow={0.7}
>
  …
</LightRain>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/light-rain.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `colors` | `string[]` | `["#000000","#071a46","#1c4fb8","#6ea6ff","#eef5ff"]` | Dark to bright: the light is mapped through these, blended in OKLCH. |
| `density` | `number` | `1` | How many lines. |
| `spread` | `number` | `1` | How wide the band of lines is. |
| `glints` | `number` | `1` | How many bright glints slide along the lines. |
| `glintLength` | `number` | `1` | Spacing of the glints along a line; larger is fewer. |
| `haze` | `number` | `1` | Soft glow drifting between the lines. |
| `intensity` | `number` | `1` | Brightness. |
| `direction` | `"down" \| "up"` | `"down"` | Which way the light moves. |
| `speed` | `number` | `1` | Animation speed; 1 is the designed pace. |
| `grain` | `number` | `0.02` | Film grain strength. |
| `animate` | `boolean` | `true` | Move on its own. Off draws one still frame. |
| `interactive` | `boolean` | `true` | React to the pointer. |
| `radius` | `number` | `160` | How far the pointer light reaches. |
| `follow` | `number` | `0.7` | How lazily it follows the pointer, 0 (locked) to 1 (drifts after it). |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `children` | `ReactNode` |  | Content shown on top of the background. |
| `className` | `string` |  | Classes for the box; it fills whatever size you give it. |

## Where it fits

- **Dark tech heroes**: Thin falling lines of blue light add motion behind a developer or AI product headline.
- **Coming-soon pages**: Glints sliding along the lines keep a sparse page alive. Pairs with [Waitlist Input](https://uibrik.com/components/waitlist-input.md).
- **Data and cloud products**: Streaming light suggests data flowing through a system.

## Same shelf: Backgrounds

- [Light Stream](https://uibrik.com/components/light-stream.md): An hourglass of fine iridescent light streaks with glittering dust, flowing through the dark.
- [Mesh Gradient](https://uibrik.com/components/mesh-gradient.md) (Pro): Six drifting points of colour melting into each other along soft, curling seams.
- [Oil Slick](https://uibrik.com/components/oil-slick.md) (Pro): Light on a film of oil over dark water, folding slowly through blue, gold and coral, shot on grainy film.
- [Pen Plotter](https://uibrik.com/components/pen-plotter.md) (Pro): A flow field plotted in ink line by line, on a sheet that sways like silk, with glints running down the threads; the pointer brushes the lines and a click sends a wave.
- [Pixel Burst](https://uibrik.com/components/pixel-burst.md) (Pro): Square pixels burst from the centre or the edges in a checkerboard that pales into loose, flickering pixels, with a ring pulsing out now and then.
- [Riso Flow](https://uibrik.com/components/riso-flow.md): A flowing gradient printed in grainy spot inks that drift slightly out of register.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/light-rain/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
