← All components
Atmospheres / background

Light Tunnel

Pulses of light run along a radial cable tunnel with gentle pointer parallax.

Open in studio ↗
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

  • Give the component a container with an explicit height. It fills that container.
  • The included Demo.tsx recreates the complete preview; the main component contains only the background.
  • Reduced motion renders a still frame. Hidden/offscreen instances stop requesting frames; pause and replay are supported.
  • A static CSS atmosphere remains when graphics acceleration is unavailable. Canvas resolution is capped at 2048 pixels per dimension.
React 19WebGL2OGL 1.0.11

React Bits · MIT with Commons Clause. Used with explicit project permission; see bundled notice.

Props

PropTypeDefaultDescription
cableColorstring#A855F7Cable color
pulseColorstring#A855F7Pulse color
tunnelColorstring#5227FFTunnel color
speednumber0.1Motion speed
flowDirectionoutward|inwardoutwardFlow direction
cableCountnumber20Cable count
pulseSpeednumber2Pulse speed
pulseLengthnumber0.28Pulse length
thicknessnumber0.35Cable thickness
swaynumber0.5Sway
glownumber1Glow
tunnelOpacitynumber0Tunnel opacity
grainIntensitynumber0.05Grain intensity
grainbooleantrueFilm grain
mouseInteractionbooleantruePointer parallax
mouseStrengthnumber0.1Pointer strength
pulseBlendnumber1Shader setting; see included source for its bounded range.
pulseWidthnumber1Shader setting; see included source for its bounded range.
rimWidthnumber0.15Shader setting; see included source for its bounded range.
wavinessnumber0.3Shader setting; see included source for its bounded range.
sizenumber1Shader setting; see included source for its bounded range.
centerXnumber0Shader setting; see included source for its bounded range.
centerYnumber0Shader setting; see included source for its bounded range.
fadeNearnumber0.5Shader setting; see included source for its bounded range.
fadeFarnumber2Shader setting; see included source for its bounded range.
brightnessnumber1Shader setting; see included source for its bounded range.
colorVariancebooleantrueShader setting; see included source for its bounded range.
opacitynumber1Shader setting; see included source for its bounded range.
pausedbooleanfalseFreeze the current frame.
replayTokennumber0Change this value to restart the animation.
classNamestring''Additional outer classes.