Light Rays

Dynamic light rays with customizable origin, colors, and mouse interaction.

Bynana UI

Welcome to the future of design

Usage

import LightRays from './LightRays';

<div style={{ width: '100%', height: '600px', position: 'relative' }}>
  <LightRays
    raysOrigin="top-center"
    raysColor="#00ffff"
    raysSpeed={1.5}
    lightSpread={0.8}
    rayLength={1.2}
    followMouse={true}
    mouseInfluence={0.1}
    noiseAmount={0.1}
    distortion={0.05}
  />
</div>

Props

PropTypeDefaultDescription
raysOriginRaysOrigin"top-center"Origin point of rays
raysColorstring"#ffffff"Color of the rays
raysSpeednumber1Animation speed
lightSpreadnumber1Spread of light
rayLengthnumber2Length of rays
followMousebooleantrueFollow mouse movement
mouseInfluencenumber0.1Mouse influence strength
noiseAmountnumber0.0Noise amount
distortionnumber0.0Distortion amount