Soft rays of light rising from beyond the frame
| Name | Type | Default | Description |
|---|---|---|---|
colors | string[] | ["#5227FF", "#B84DFF", "#FF9FFC", "#FFE6FA"] | Up to four colours, from the body of the rays to their hottest core. |
backgroundColor | string | "#06040d" | Colour behind the light. Pass "transparent" to composite over the page. |
blend | "add" | "ink" | "add" | "add" emits light on dark backgrounds, "ink" shades light ones. |
originX | number | 0.5 | Horizontal position of the light source, 0 left to 1 right. |
originY | number | -0.7 | Vertical position of the light source, 0 bottom to 1 top. Values beyond the frame give long, nearly parallel rays. |
angle | number | 0 | Direction the rays travel, in degrees. 0 points up, 180 down. |
tilt | number | 20 | Leans the rays towards the viewer in perspective, in degrees. 0 keeps them flat, negative values send them into the distance. |
spread | number | 34 | Half-width of the fan of rays, in degrees. |
rays | number | 10 | Number of rays in the fan, 1 to 16. |
rayWidth | number | 1 | Multiplier for the width of every ray. |
reach | number | 1.1 | How far the light travels into the frame before fading, in frame heights. |
swing | number | 1 | How far the rays drift from their resting angles. 0 holds them still. |
flicker | number | 0.6 | How strongly the rays fade in and out over time, 0 to 1. |
haze | number | 1 | Soft light scattered between the rays and drifting along them. 0 gives clean rays. |
intensity | number | 1 | Overall brightness. |
speed | number | 1 | Animation speed. 0 holds the current frame. |
interactive | boolean | true | Lights up the rays the pointer passes over. |
cursorBoost | number | 1 | How brightly a ray flares when the pointer lines up with it. 0 disables it. |
cursorWidth | number | 5 | Angular reach of the pointer, in degrees. Wider values light up neighbouring rays too. |
grain | number | 0 | Optional film grain. Gradients are already dithered, so 0 stays free of banding. |
seed | number | 0 | Changes the arrangement and timing of the rays. |
paused | boolean | false | Freezes the drifting rays. |
dpr | number | 1.5 | Upper bound for the device pixel ratio. |
className | string | — | Classes for the root element. Give it a height. |
style | CSSProperties | — | Inline styles for the root element. |
children | ReactNode | — | Content layered above the light. |
colorsstring[]Up to four colours, from the body of the rays to their hottest core.
["#5227FF", "#B84DFF", "#FF9FFC", "#FFE6FA"]backgroundColorstringColour behind the light. Pass "transparent" to composite over the page.
"#06040d"blend"add" | "ink""add" emits light on dark backgrounds, "ink" shades light ones.
"add"originXnumberHorizontal position of the light source, 0 left to 1 right.
0.5originYnumberVertical position of the light source, 0 bottom to 1 top. Values beyond the frame give long, nearly parallel rays.
-0.7anglenumberDirection the rays travel, in degrees. 0 points up, 180 down.
0tiltnumberLeans the rays towards the viewer in perspective, in degrees. 0 keeps them flat, negative values send them into the distance.
20spreadnumberHalf-width of the fan of rays, in degrees.
34raysnumberNumber of rays in the fan, 1 to 16.
10rayWidthnumberMultiplier for the width of every ray.
1reachnumberHow far the light travels into the frame before fading, in frame heights.
1.1swingnumberHow far the rays drift from their resting angles. 0 holds them still.
1flickernumberHow strongly the rays fade in and out over time, 0 to 1.
0.6hazenumberSoft light scattered between the rays and drifting along them. 0 gives clean rays.
1intensitynumberOverall brightness.
1speednumberAnimation speed. 0 holds the current frame.
1interactivebooleanLights up the rays the pointer passes over.
truecursorBoostnumberHow brightly a ray flares when the pointer lines up with it. 0 disables it.
1cursorWidthnumberAngular reach of the pointer, in degrees. Wider values light up neighbouring rays too.
5grainnumberOptional film grain. Gradients are already dithered, so 0 stays free of banding.
0seednumberChanges the arrangement and timing of the rays.
0pausedbooleanFreezes the drifting rays.
falsedprnumberUpper bound for the device pixel ratio.
1.5classNamestringClasses for the root element. Give it a height.
—styleCSSPropertiesInline styles for the root element.
—childrenReactNodeContent layered above the light.
—