Skip to content
Uxelith
Prov1.0.0Backgrounds

Light Trail

A trail of light that follows the pointer across your headline and bends the letters under it like glass: neon that shifts colour, clear glass, or embers with rising sparks.

Installs with Uxelith ProHow
Licence
Pro
Packages
2
Updated
12 Nov 2026
Live

Installation

Usage

example.tsx
import { LightTrail } from "@/components/light-trail"

export function Hero() {
  return (
    <LightTrail text="Light follows your hand." variant="neon" className="flex min-h-[32rem] flex-col items-center justify-end px-6 pb-12 text-center">
      <p className="text-muted-foreground">Move your pointer across the headline.</p>
    </LightTrail>
  )
}

Props

PropTypeDefaultDescription
textstring"Light follows your hand."The headline the light passes over, in your page's font, up to three lines. Also real text on the page.
variant"neon" | "glass" | "ember""neon"Light that shifts colour, clear glass that bends the letters, or embers with rising sparks.
colorsstring[]—Colours the light cycles through (neon and ember). Leave it out for the full spectrum or fire.
widthnumber1Thickness of the trail, 0.5–2.
lengthnumber1How long the trail lingers, 0.5–2.
ynumber0.5Where the headline sits, from 0 (top) to 1 (bottom).
autoplaybooleantrueWhen nobody is pointing, the light draws loops on its own.
interactivebooleantrueThe light follows the pointer or a finger.
momentnumber—Holds the picture as the trail stands at this moment of its loops, in seconds.
captureRefRef<LightTrailHandle>—capture(width, height) resolves a PNG at any size: wallpapers, social cards, a 4K hero.
...propsHTMLAttributes<HTMLDivElement>—Children sit above the picture and stay interactive.

Accessibility

  • The headline is real text in the page (visually hidden), so screen readers and search engines read it; the canvas and its still are decorative and hidden from assistive technology.
  • On a light background the light tints like ink and on a dark one it glows, so the headline keeps its contrast in both themes.
  • With prefers-reduced-motion it holds one still moment of its loops and ignores the pointer.
  • It pauses off-screen and in hidden tabs, and frees its GPU memory when removed.
  • Without WebGL2, on a software renderer, or on a device that can't hold a smooth frame rate, it shows the headline without the effect.

Changelog

  1. v1.0.0Latest

    First release.

More in Backgrounds

All 9 in Backgrounds
  • BackgroundsPro

    ASCII Field

    Your headline or a photo drawn in characters, like a terminal: near the pointer the letters ripple and warm up, and a press sends a wave across the field.

  • BackgroundsPro

    Dither Lens

    A picture in two inks, dithered like an old screen or newsprint, with a lens that shows the real colours wherever the pointer goes while the dots ripple out around it.

  • BackgroundsFree

    Fluid Ink

    Ink that flows like a real fluid behind your content: stir it with the pointer, press to burst colour, and watch it curl and fade. A WebGL fluid simulation in your theme colours, with no libraries.