Skip to content

Light Beams

Soft shafts of light drift across a dark, atmospheric field.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import LightBeams from "./LightBeams";
export default function Example() {
return (
<LightBeams
color={"#b5cbe0"}
background={"#101820"}
speed={14}
intensity={0.65}
angle={-20}
minHeight={400}
children={"Make room for light."}
style={{
"fontSize": 34,
"letterSpacing": "-.05em",
"color": "#edf1f6"
}}
/>
);
}

Using Light Beams

Place content in children and set minHeight for the illuminated section. angle determines where the light shafts fall.

Use intensity sparingly behind text. The colour and background props let you keep the effect consistent with a neutral page palette.

Props

NameTypeRequiredDefaultDescription
colorstringNo"#bdd3e8"Beam colour.
backgroundstringNo"#101820"Background colour.
speednumberNo14One-way sweep duration in seconds.
intensitynumberNo.65Overall beam opacity from zero to one.
anglenumberNo-20Beam field rotation in degrees.
minHeightnumber | stringNo400Minimum viewport height in pixels or a CSS length.
childrenReactNodeNoundefinedOptional content above the beams.
classNamestringNo""Additional classes merged with the component styles.
styleCSSPropertiesNoundefinedInline styles for caller-defined sizing, typography, and appearance.

Related components

Lava Lamp

Backgrounds

Warm liquid forms merge and drift inside a softly lit glass lamp.

Helix Field

Backgrounds

Two strands of shaded particles rotate around fine connecting rungs.

Wave Lattice

Backgrounds

A fine perspective mesh drifts over a sculpted wave surface.

Kinetic Mobile

Backgrounds

Suspended discs, rings and counterweights sway on fine connecting rods.