Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Backgrounds

  • DotPattern
  • GridPattern
  • StripedPattern
  • Spotlight
  • FadeMask
  • RetroGrid
  • Ripple
  • Meteors
  • Aurora
  • Particles
  • FlickeringGrid
  • WavyBackground
  • Silk
  • Iridescence
  • Threads
  • Orb
  • LiquidChrome
  • Balatro
  • Ballpit
  • Beams
  • ColorBends
  • DarkVeil
  • Dither
  • DotField
  • EvilEye
  • FaultyTerminal
  • Ferrofluid
  • FloatingLines
  • Galaxy
  • GradientBlinds
  • Grainient
  • GridDistortion
  • GridMotion
  • GridScan
  • Hyperspeed
  • LetterGlitch
  • Lightfall
  • Lightning
  • LightPillar
  • LightRays
  • LineWaves
  • LiquidEther
  • PixelBlast
  • PixelSnow
  • Plasma
  • PlasmaWave
  • Prism
  • PrismaticBurst
  • Radar
  • RippleGrid
  • ShapeGrid
  • SideRays
  • SoftAurora

Overlay Effects

  • BorderBeam
  • ShineBorder
  • GlareHover
  • Lens
  • AnimatedBeam
  • OrbitingCircles
  • ProgressiveBlur
  • CardSpotlight
  • Reveal
  • Antigravity
  • BlobCursor
  • ClickSpark
  • Crosshair
  • ElectricBorder
  • GhostCursor
  • GradualBlur
  • ImageTrail
  • LaserFlow
  • MagicRings
  • Magnet
  • MagnetLines
  • MetaBalls
  • MetallicPaint
  • OrbitImages
  • PixelTrail
  • PixelTransition
  • Ribbons
  • ShapeBlur
  • SplashCursor
  • StarBorder
  • StickerPeel
  • TargetCursor
  • Cubes
  • Tilt
  • BorderGlow
  • GlassIcons
  • GlassSurface
  • Lanyard
  • ModelViewer
  • FluidGlass

SideRays

side-rays

Fans two animated light beams from a screen corner with adjustable blending.

Usage

Basic usage

By default, it diverges from the upper right corner and eats chart-1/chart-2 token in two bundles; it comes with absolute inset-0 z-0 when placed in the relative container.

SideRays
tsx
<div className="relative h-56 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.14 0.02 255)" }}>
  <SideRays opacity={0.85} />
</div>

Starting corner · Custom color

origin four corners are optional, rayColor1/rayColor2 specifies double beam colors to be superimposed into mixed colors.

tsx
<SideRays
  origin="bottom-left"
  rayColor1="oklch(0.78 0.18 70)"
  rayColor2="oklch(0.7 0.22 30)"
  intensity={2.4}
  opacity={0.8}
/>

Come together · High intensity

spread is turned down to make the two beams gather into a beam of light, intensity is brightened, and falloff is controlled to attenuate with distance.

tsx
<SideRays spread={1} intensity={3} falloff={1.9} opacity={0.9} />

Color removal · Slight tilt

saturation=0 Grayscale beam (minimalist style), tilt rotates the entire sector around the light source point.

tsx
<SideRays saturation={0} tilt={18} opacity={0.7} />

When to Use

You want a slowly swinging volumetric light beam that shoots out from a corner (hero/landing page side lighting). If you want the center spotlight to follow the mouse, use Spotlight; if you want full-screen dot/line texture, use DotPattern / StripedPattern; SideRays is the only special "side light" in this family that emits dual beams from any starting point of the four corners and can adjust the angle/color mixing/saturation.

Import

ts
import { SideRays } from "@hulianui/ui"

Props

NameTypeDefaultDescription
speednumber2.5Beam animation speed factor (2nd beam 0.2× slow dephasing), mapped GLSL iSpeed
rayColor1stringvar(--color-chart-1)Main beam color, any CSS color string
rayColor2stringvar(--color-chart-2)Auxiliary beam color, superimposed with the main color to produce a mixed color
intensitynumber2Overall brightness intensity, too high will easily overexpose
spreadnumber2Beam opening angle (sector width), the smaller it is, the more it will gather together
origin"top-left"|"top-right"|"bottom-left"|"bottom-right""top-right"Beam divergence corner starting point
tiltnumber0Overall tilt angle of the beam (degrees), rotating sector around the light source point
saturationnumber1.5Saturation, 1=primary color / >1 enhance color / 0=remove color
blendnumber0.75Two-bundle color mixing ratio (0-1), 0=primary color only / 1=secondary color only
falloffnumber1.6The brightness attenuation index with distance, the larger it is, the more concentrated it is near the light source
opacitynumber1Overall opacity (0-1), commonly used for overlay content 0.5-0.8
classNamestring-Additional class name for the root container; the component includes absolute inset-0 z-0

Slots

SlotTypeDescription
fallbackReactNodereduced-motion / static alternative content without WebGL (default radial-gradient div)

Usage Guidelines

  • WebGL requires client rendering; the component already declares "use client" and can be placed beneath a server-rendered page boundary.
  • The component comes with absolute inset-0 z-0, and the parent container must have positioning + size + overflow-hidden, otherwise it will not be visible.
  • High intensity can clip to white. Use opacity around 0.5-0.8 when rays sit beneath content.
  • Under reduced motion or without WebGL, the component renders a directional static fallback. Do not rely on the swing to convey information.

Related

DotPattern · GridPattern · StripedPattern · Spotlight · RetroGrid · Ripple

Playground

SideRays
<div className="relative h-56 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.14 0.02 255)" }}>
  <SideRays
    speed={2.5}
    intensity={2}
    spread={2}
    origin="top-right"
    opacity={0.85}
  />
</div>
PreviousShapeGridDecorationNextSoftAurora

On this page

  • Usage
  • Documentation
    • When to Use
    • Import
    • Props
    • Slots
    • Usage Guidelines
    • Related
  • Playground