Lasers
Stage lasers fanning from the top or bottom edge, sweeping slowly through patchy haze, with a bright source flare.
New in 1.7.
Twelve hours, one room, no phones
Halle 7, Berlin. 4 to 6 April, doors at 22:00. 1,800 tickets a night, stickers on every camera.
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/lasers.jsonUsage
import { Lasers } from "@/components/ui/lasers"
<section className="relative overflow-hidden bg-[#05060a]">
<Lasers origin="bottom" />
<h1 className="relative">Twelve hours, one room, no phones</h1>
</section>Examples
Several projectors
sources={3} spaces projectors along the edge. Neighbors sweep in opposite directions, so their beams scissor through each other.
Haze
haze sets how patchy the smoke is: at 1 the beams come and go through clouds, at 0 they're clean lines.
Still
speed={0} holds one frame. Position the layer with style or className to aim it off-center.
API reference
One canvas that fills the nearest positioned parent. Accepts native div attributes.
| Prop | Type | Default |
|---|---|---|
color | NeonColorBeam color. Cores and the source flare burn whiter. | inherited |
origin | "top"Which edge the projectors sit on. | "bottom" |
beams | numberBeams per projector. | 8 |
spread | numberWidth of each fan, in degrees. | 76 |
sources | numberProjectors spaced along the edge, up to 5. | 1 |
speed | numberSpeed multiplier for the sweep. 0 holds still. | 1 |
intensity | numberBrightness of the beams and the flare, 0 to 1. | 0.85 |
haze | numberHow much the smoke breaks the beams up, 0 to 1. | 0.7 |
Accessibility
- Decorative: rendered with aria-hidden and pointer-events: none.
- The smoke is a small noise field sampled along each beam into gradient stops, so there's no full-screen blur or composite per frame.
- It pauses offscreen and in hidden tabs, and draws one still frame under prefers-reduced-motion.