← All components
Atmospheres / effect

Laser Flow

A volumetric light beam with flowing fog, wisps and restrained pointer parallax.

PLAYGROUND
Live preview
Preparing preview…

Take it with you.

SOURCE ACCESS

Preview freely. Unlock the files.

Enter the shared password to copy the complete source, download every file, and install components in your app.

Access lasts 24 hours. Your preview settings stay with you.

Component notes

  • Preserves the complete beam, fog, wisps and optical shader. Demo supplies the negative-space composition; import LaserFlow for your own content.
  • The primitive fills its parent and requires an explicit container height. Generated usage supplies that height; use a positioned layer when composing with text.
  • Uniform controls update the existing renderer. Owned elapsed time excludes hidden, offscreen and paused time; replay restarts the phase. Reduced motion uses a stationary render.
  • DPR and quality are bounded to 0.6–1.5; physical render edges are capped at 4096 pixels. Context loss recovers and GPU failure leaves a static CSS beam.
React 19.2Modern browsersWebGL

React Bits — David Haz · MIT + Commons Clause. Reuse explicitly authorized; see bundled exact notice.

Props

PropTypeDefaultDescription
colorstring"#ff79c6"Beam color; accepted ranges and choices are shown in the controls.
backgroundColorstring'#000000'Shader compositing background. Demo and gallery default to #08070c.
horizontalBeamOffsetnumber0.1Horizontal offset; accepted ranges and choices are shown in the controls.
verticalBeamOffsetnumber0Vertical offset; accepted ranges and choices are shown in the controls.
flowSpeednumber0.35Flow speed; accepted ranges and choices are shown in the controls.
verticalSizingnumber2Vertical size; accepted ranges and choices are shown in the controls.
horizontalSizingnumber0.5Horizontal size; accepted ranges and choices are shown in the controls.
fogIntensitynumber0.45Fog intensity; accepted ranges and choices are shown in the controls.
fogScalenumber0.3Fog scale; accepted ranges and choices are shown in the controls.
wispDensitynumber1Wisp density; accepted ranges and choices are shown in the controls.
wispSpeednumber15Wisp speed; accepted ranges and choices are shown in the controls.
wispIntensitynumber5Wisp intensity; accepted ranges and choices are shown in the controls.
flowStrengthnumber0.25Flow strength; accepted ranges and choices are shown in the controls.
decaynumber1.1Decay; accepted ranges and choices are shown in the controls.
falloffStartnumber1.2Falloff start; accepted ranges and choices are shown in the controls.
fogFallSpeednumber0.6Fog fall speed; accepted ranges and choices are shown in the controls.
mouseSmoothTimenumber0Pointer smoothing; accepted ranges and choices are shown in the controls.
mouseTiltStrengthnumber0.01Pointer tilt; accepted ranges and choices are shown in the controls.
qualitynumber1Quality; accepted ranges and choices are shown in the controls.
dprnumberdevice DPROptional display density override, bounded with quality to 0.6–1.5.
ariaLabelstring'Laser flow light beam'Meaningful label; use an empty string for a decorative layer.
pausedbooleanfalseStops decorative motion while preserving useful content and interaction.
replayTokennumber0Change to restart decorative phase without remounting content; static prints and agent activity retain their state.
classNamestring''Additional scoped host class.
styleCSSPropertiesundefinedInline host styles; caller owns container layout.