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

LaserFlow

laser-flow

Pours volumetric laser beams through procedural fog with flow detail and pointer steering.

Usage

Basic usage

Put it into the dark container of relative + overflow-hidden. LaserFlow comes with absolute inset-0, and the content is stacked with z-10.

LaserFlow
tsx
<div className="relative h-72 overflow-hidden rounded-xl bg-neutral-950">
  <LaserFlow />
  <div className="relative z-10 flex h-full items-center justify-center">
    LaserFlow
  </div>
</div>

Custom color and fog

color changes the laser color tone, fogIntensity adds fog, and fogScale controls the fineness of the mist.

tsx
<LaserFlow
  color="oklch(0.72 0.2 35)"
  fogIntensity={0.6}
  fogScale={0.35}
/>

Dense streamer · Fast pulse

wispDensity/wispIntensity encrypts micro-streamer, flowSpeed/flowStrength enhances pulse feeling.

Hulian component library

Volumetric Light · WebGL · Subject Awareness

tsx
<LaserFlow
  wispDensity={1.6}
  wispIntensity={6}
  flowSpeed={0.55}
  flowStrength={0.4}
/>

Offset beam

horizontalBeamOffset moves the beam laterally, verticalSizing elongates the beam.

tsx
<LaserFlow
  horizontalBeamOffset={-0.18}
  verticalSizing={2.4}
  color="oklch(0.7 0.18 200)"
/>

When to Use

Use LaserFlow as a full-screen or section backdrop when one vertical beam should cut through fog and carry subtle flowing highlights. It is a high-cost atmospheric effect, so reserve it for a focal surface rather than repeating it in lists. Choose BorderBeam for an element outline or GhostCursor for smoke that follows the pointer.

Import

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

Props

NameTypeDefaultDescription
colorstringvar(--color-chart-1)Main beam color; accepts any CSS color and defaults to a theme-aware chart token
horizontalBeamOffsetnumber0.0Horizontal beam offset as a fraction of viewport width; positive moves right and negative moves left
verticalBeamOffsetnumber0.0Vertical beam offset as a fraction of viewport height
flowSpeednumber0.35Speed multiplier for light pulses traveling through the beam
verticalSizingnumber2.0Multiplier for the beam's vertical reach
horizontalSizingnumber0.5Multiplier for the horizontal flare length
fogIntensitynumber0.45Volumetric-fog strength; 0 removes the fog contribution
fogScalenumber0.3Fog-noise scale; higher values split the fog into finer structures
fogFallSpeednumber0.6Downward drift speed of the fog field
wispDensitynumber1Density of the subtle flowing highlights along the beam, from 0 to 2
wispSpeednumber15Travel speed of those flowing highlights
wispIntensitynumber5Brightness of the flowing highlights
flowStrengthnumber0.25Contrast of the traveling light pulse, from 0 to 1
decaynumber1.1Width of the beam's attenuation phase
falloffStartnumber1.2Position at which beam luminance begins to fall off
mouseTiltStrengthnumber0.01Amount of fog tilt driven by pointer input that reaches the canvas; 0 disables the response
classNamestring-Class name forwarded to the live or fallback root

Slots

SlotTypeDescription
fallbackReactNodeDecorative content rendered over the static theme-token beam when reduced motion is enabled; the fallback root is aria-hidden

Usage Guidelines

  • LaserFlow is an absolute inset-0 z-0 decorative layer. Use a relative overflow-hidden parent with an explicit height and place foreground content at relative z-10 or above.
  • Its WebGL lifecycle creates a fresh canvas for each mount, avoiding context reuse after cleanup during React StrictMode remounts. See [[webgl-canvas-loseContext-poisons-strictmode-remount]].
  • During SSR, the live root has no canvas. After hydration, a canvas is appended before OGL import and scene setup; if either step fails, that uninitialized or blank canvas remains and LaserFlow does not switch to the reduced-motion fallback. Reduced motion instead renders the theme-token gradient plus decorative fallback content.
  • The live and fallback roots are aria-hidden, so provide all essential content outside LaserFlow.
  • The live root defaults to pointer-events-none. Add pointer-events-auto through className if pointer tilt is required, and make sure foreground layers do not take those pointer hits.

Related

BorderBeam · ShineBorder · GlareHover · Lens · AnimatedBeam · OrbitingCircles

Playground

LaserFlow
<div className="relative h-72 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.13 0.02 285)" }}>
  <LaserFlow
    flowSpeed={0.35}
    fogIntensity={0.45}
    wispIntensity={5}
    horizontalBeamOffset={0}
  />
</div>
PreviousImageTrailDecorationNextMagicRings

On this page

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