- Docs
- Components
- Backgrounds
- Blurred Rays
Soft vertical beams of light that flicker through the spectrum
| Name | Type | Default | Description |
|---|---|---|---|
colors | [string, string] | undefined | Two colours for the beams, blended in OKLCh. Leave it unset for the classic spectrum, where the light drifts through every hue. |
backgroundColor | string | "transparent" | Fill behind the beams. Transparent shows the page. On a light background the beams are drawn as ink. |
rayCount | number | 25 | Number of beams, from 1 to 128. |
raySpacing | number | 0.27 | Gap between neighbouring beams. |
rayThickness | number | 0.35 | Width of the bright body of each beam. |
edgeSoftness | number | 0.65 | Width of the soft falloff around each beam. |
widthPulse | number | 0.1 | How much each beam slowly swells and narrows. |
widthBase | number | 0.3 | Base width scale for every beam. |
speed | number | 0.5 | Overall speed of the animation. |
flickerRate | number | 1 | How fast the beams flicker. Fast settings are smoothed so they never strobe. |
horizontalScale | number | 4.6 | Horizontal zoom. Higher values pack the beams closer. |
verticalOffset | number | -0.5 | Moves the field of light up or down. |
originX | number | 0 | Moves the whole row of beams sideways. |
colorShiftR | number | 1 | How strongly red drops out of the light over time. Also shapes the flicker. |
colorShiftG | number | 1 | How strongly green drops out of the light over time. |
colorShiftB | number | 1 | How strongly blue drops out of the light over time. |
vignetteTop | number | 1.3 | Length of the fade at the top of the beams. |
vignetteBottom | number | 0.95 | Length of the fade at the bottom of the beams. |
vignetteLeft | number | 3 | Reach of the fade on the left side. |
vignetteRight | number | 3 | Reach of the fade on the right side. |
depth | number | 1 | Spreads the beams over three depth layers. Far beams are softer and dimmer. 0 keeps them flat. |
bloom | number | 4 | Soft glow around the brightest light. |
brightness | number | 2 | Overall exposure of the light. |
opacity | number | 1 | Opacity of the beams. |
parallax | number | 1 | How far the depth layers slide with the pointer. Near beams move more than far ones. |
waveStrength | number | 1 | Strength of the brightness wave a click sends across the beams. |
interactive | boolean | true | Hover to shift the depth layers. Click to send a wave of light outward from that point. Waves stack. |
intro | boolean | true | The beams fade up one by one when the component mounts. |
paused | boolean | false | Stops the flicker. Reduced-motion users get a still frame. |
dpr | number | 2 | Maximum device pixel ratio for the canvas. |
width | string | number | "100%" | Width of the root element. |
height | string | number | "100%" | Height of the root element. |
ref | { wave, replay } | - | wave(x?, strength?) sends a wave from a 0 to 1 position. replay() restarts the intro. |
children | ReactNode | - | Content rendered above the light. |
className | string | - | Classes for the root element. |
style | CSSProperties | - | Inline styles for the root element. |
colors[string, string]Two colours for the beams, blended in OKLCh. Leave it unset for the classic spectrum, where the light drifts through every hue.
undefinedbackgroundColorstringFill behind the beams. Transparent shows the page. On a light background the beams are drawn as ink.
"transparent"rayCountnumberNumber of beams, from 1 to 128.
25raySpacingnumberGap between neighbouring beams.
0.27rayThicknessnumberWidth of the bright body of each beam.
0.35edgeSoftnessnumberWidth of the soft falloff around each beam.
0.65widthPulsenumberHow much each beam slowly swells and narrows.
0.1widthBasenumberBase width scale for every beam.
0.3speednumberOverall speed of the animation.
0.5flickerRatenumberHow fast the beams flicker. Fast settings are smoothed so they never strobe.
1horizontalScalenumberHorizontal zoom. Higher values pack the beams closer.
4.6verticalOffsetnumberMoves the field of light up or down.
-0.5originXnumberMoves the whole row of beams sideways.
0colorShiftRnumberHow strongly red drops out of the light over time. Also shapes the flicker.
1colorShiftGnumberHow strongly green drops out of the light over time.
1colorShiftBnumberHow strongly blue drops out of the light over time.
1vignetteTopnumberLength of the fade at the top of the beams.
1.3vignetteBottomnumberLength of the fade at the bottom of the beams.
0.95vignetteLeftnumberReach of the fade on the left side.
3vignetteRightnumberReach of the fade on the right side.
3depthnumberSpreads the beams over three depth layers. Far beams are softer and dimmer. 0 keeps them flat.
1bloomnumberSoft glow around the brightest light.
4brightnessnumberOverall exposure of the light.
2opacitynumberOpacity of the beams.
1parallaxnumberHow far the depth layers slide with the pointer. Near beams move more than far ones.
1waveStrengthnumberStrength of the brightness wave a click sends across the beams.
1interactivebooleanHover to shift the depth layers. Click to send a wave of light outward from that point. Waves stack.
trueintrobooleanThe beams fade up one by one when the component mounts.
truepausedbooleanStops the flicker. Reduced-motion users get a still frame.
falsedprnumberMaximum device pixel ratio for the canvas.
2widthstring | numberWidth of the root element.
"100%"heightstring | numberHeight of the root element.
"100%"ref{ wave, replay }wave(x?, strength?) sends a wave from a 0 to 1 position. replay() restarts the intro.
-childrenReactNodeContent rendered above the light.
-classNamestringClasses for the root element.
-styleCSSPropertiesInline styles for the root element.
-