uibrik

Light Stream

Preview

Customize

Colors
Background
Intensity1.35
Density0.85
Waist0.10
Flare1.55
Curve1.00
Angle-32°
Length0.55
Glow1.00
Chroma0.90
White0.80
Dust0.50
Dust size0.60
Dust glow0.5
up
Speed1.1
Grain0.065
Seed0
Lean0.40
Follow0.80

Usage

import { LightStream } from "@/components/uibrik/light-stream/light-stream";

<LightStream />

Installation

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

Props

LightStream
colors
Type string[]
["#ff6a1a","#ffb04a","#fff0dc","#ff7d2e","#5fe3d3","#9a78ff"]
Streak tints; the first also warms the glow. 2 to 6 colours.
background
Type string
"#050505"
Colour behind the light.
intensity
Type number
1.35
Exposure: how bright the light is.
density
Type number
0.85
How many streaks; higher is finer and denser.
waist
Type number
0.1
Width of the stream at its narrowest.
flare
Type number
1.55
How much the stream opens toward its ends.
curve
Type number
1
How much the stream bends and sways.
angle
Type number
-32
Tilt of the stream.
length
Type number
0.55
Length of the streak dashes; larger is longer.
glow
Type number
1
Halo around each streak and haze around the core.
chroma
Type number
0.9
Colour fringing at the edges of the streaks.
white
Type number
0.8
How much the hottest light burns to white.
dust
Type number
0.5
Glittering dust along the stream.
dustSize
Type number
0.6
Size of the dust sparks; each spark still varies around it.
dustGlow
Type number
0.5
How many sparks carry a soft halo; 1 is about one in six.
direction
Type "up" | "down"
"up"
Which way the light flows.
speed
Type number
1.1
Animation speed; 1 is the designed pace.
grain
Type number
0.065
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.
lean
Type number
0.4
How far the stream bends toward the pointer.
follow
Type number
0.8
How lazily the stream 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.