Light band
A React component in Beamline's Motion & effects category.
A band of split light in the dark behind a section, blue at one end and amber at the other with a bright core: Prism's light at a chosen place, a hero, the plan you sell or the closing call to action. Drawn live by default: it turns slowly in depth like a ribbon and its spectrum flows, more while the page moves; it moves at its own depth as its section passes, and a pulse of light runs along it while the page scrolls. It moves while something happens (its first run, a scroll, the pointer over its section, a resize) and for 9 s after, then eases to rest and does no work until woken. Without WebGL, on a light page or under reduced motion it is the painted band. Draws only on screen.
Use it for
- A marketing or product hero: the band rises round the headline (variant rise).
- The plan you sell on a pricing section: the band rises behind its card, so that card's glass takes the colour (arc).
- A closing call to action or an empty first screen that should feel considered: a low arc under the words (horizon).
Not for
- Saying something is happening (glow: it is bound to a state that ends).
- Every section or every card: one or two bands on a page, at the places the eye should land; the rest stays dark.
- Dense working screens (tables, terminals, editors): light behind data is noise.
- A page colour or texture everywhere (the look's page: Prism already lays two far-off corners of light on the page).
Anatomy
- root: fills its parent (absolute, inset 0, behind the content); `data-drawn` says which renderer draws it (live · painted); `data-resting` while it is at rest (its CSS turn held)
- body (live): one WebGL canvas — the band as a sheet of light turning about its crisp edge; core, strands and body in one drawing, the pulse included
- body (painted): the band painted once — a soft body, fine strands near its edge each a little off in hue
- core (painted): a thin near-white line where the light is strongest, on its own layer so it can breathe
- pulse (painted): a soft window that slides along the band over a lit copy of it, shown only while the page scrolls and once when the band is first on screen
Variants
- variant: rise, arc, horizon
- strength: 0–1
- mirror: true, false
- scroll: true, false
- live: true, false
States
- live, quiet on screen: the sheet leans a little and turns slowly (a wave every 80 s) while its spectrum drifts on its own 30 s clock, drawn 6 times a second; from 4 s after the last scroll, pointer move over its section or resize it eases to a stop and at 9 s it rests
- live, first on screen: one 5 s run — a pulse of light runs up the band while the sheet turns and the spectrum leans
- live, page scrolling: the turn travels with the page and deepens, the spectrum leans the way the page moves, a pulse runs along the band; drawn every frame while the page moves, then settling over a few seconds at 15 a second
- painted, quiet on screen: turns a degree or two over about a minute; the core brightens and dims over 13 s; 9 s after the last scroll, pointer move over its section or resize both hold on their current step (a hundredth of a degree: no visible stop) and it rests
- painted, page scrolling: a pulse runs along the band with the scroll and fades within half a second of the page stopping
- both: the band moves at its own depth with its section as the page scrolls (scroll-driven CSS)
- at rest (both): holds its pose; no frames, no running CSS animation (`data-resting` pauses the turn and the breathing), no timers — only the scroll-driven place, which costs nothing while the page is still; a scroll, the pointer moving over its section, a resize, the band coming back on screen or the tab becoming visible wakes it from where it rested, the turn easing back in
- off screen or hidden tab: paused; nothing drawn
- reduced motion: the painted band, still (no turn, no scroll movement, no pulse) — as before the live band
- light theme: the painted band, multiplied onto the page like light through a prism onto paper; the white core and the pulse disappear
- no WebGL or a lost context: the painted band
Keyboard
- None: decorative and aria-hidden; nothing in it takes focus or the pointer.
Motion
Live (default): the band is a sheet of light turning about its crisp edge in a wave that runs along it; edge-on it narrows and its light gathers, the strands close up, and the colour slides along the band's own spectrum with the angle (never into purple: the gathered light lifts the lit colours, not the dark gap). The cross-section is drawn once per size into two textures per ribbon; a frame bends the strip and looks the light up. Pace: the turn one wave per 80 s at rest and per 4500 px of scroll, building over about 0.4 s and settling over about a second; the colour on its own 30 s / 2000 px clock; the spectrum leans the way the page moves (up to 7 % of the band) and settles back; the pulse follows the scroll's speed (down runs blue to amber, up runs back). Frames by need: every frame while the page moves, the pulse runs or the first run plays; 15 a second while settling; 6 a second for the slow turn after, which eases to a stop between 4 and 9 s after the page, the pointer over its section or the window last moved, then rests: no frames, its CSS turn held (`data-resting`), until one of those (or coming back on screen, or the tab becoming visible) wakes it, the turn easing back in over about a second; none off screen or in a hidden tab. The soft edges are drawn in the shader (no CSS mask on the live band: a masked layer is composited again whole each time its canvas changes). Made (context, programs, the baked cross-section) the first time the band comes within 200 px of the screen, then fades in over 0.6 s. Painted (fallback): painted once per size on two canvases (repainted only when the box changes size, after 150 ms). CSS moves the finished layers in steps — 240 over 70 s for the turn, 90 over 13 s for the core — until 9 s after the last scroll, pointer move over its section or resize, when both hold on their current step (`data-resting`) until woken. The pulse is a lit copy seen through a soft window that script slides along the band only while the page moves (two transforms and an opacity per frame); one 2.8 s run when first on screen without scrolling. Both: where scroll-driven animations exist, the band's place is a pure function of its section's place in the view, run by the compositor — rise rests while its section fills the view and, as it leaves, sinks and turns at a slower depth than the page; arc rises and swings into place as its section arrives and lifts away as it leaves; horizon slides up from its bottom edge as it arrives without scaling its axes. Durations follow the scope's motion speed and the look's motion factor.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "rise" | "arc" | "horizon" | — | Legacy shape setting; omitted by default. Deprecated: Use shape instead. |
strength | number | — | 0–1, how strong the light is. |
mirror | boolean | — | Turn the band the other way round (rise to the top left). Right-to-left pages mirror it on their own. |
scroll | boolean | true | Answer the page's scroll: the band moves at its own depth as its section passes, and a pulse of light runs along it while the page moves. False keeps only the slow turn. |
live | boolean | true | Draw the band live (WebGL): it turns slowly in depth and its spectrum flows, more while the page moves. False — or no WebGL, a lost context, a light page, reduced motion — gives the painted band. |
classNames | LightBandClassNames | — | Classes for the named visual parts; no part overrides by default. |
style / ref | CSSProperties / native Ref | — | style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default. |
shape | LightBandVariant | — | The light band's path: rise, arc or horizon; defaults to rise. |
className | string | — | Classes on the documented visual root; no override by default. |
style | CSSProperties | — | Inline styles on the documented visual root; no inline overrides by default. |
ref | Ref<HTMLDivElement> | — | Receives the documented root element; no ref by default. |
Used in
Import
import { LightBand } from "@beamline/light-band";
Get it
Light band is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent
More in Motion & effects
- Halftone Dots: A picture rebuilt as a field of dots whose size follows brightness; a new picture morphs the dots, a click ripples through, the pointer pushes dots aside.
- Glow: Ambient light around one element that says something is happening: an aurora under a working composer, or a ring of light round a live card.
- Liquid gooey: Liquid surfaces that merge like goo when they touch — split plus-menus, gooey switches, file chips.
- Sound: Opt-in interface cues with scoped volume, graceful mute and bounded repetition; soft tactile gestures and restrained result tones.