Skip to content
Uxelith
Prov1.0.0Backgrounds

Relight

Your word or logo raised in metal, with a light that follows the pointer: highlights slide over the bevels, the edges glow warm and the ground catches the light.

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

Installation

Usage

example.tsx
import { Relight } from "@/components/relight"

export function Hero() {
  return (
    <Relight text="Forge." y={0.42} className="flex min-h-[32rem] flex-col items-center justify-end px-6 pb-12 text-center">
      <p className="text-muted-foreground">Move the light.</p>
    </Relight>
  )
}

Props

PropTypeDefaultDescription
textstring"Forge."The word raised in metal, in your page's font. Also real text on the page, for screen readers and search engines.
srcstring—A photo or logo to raise instead (same origin or served with CORS): its bright parts stand out.
colors[string, string]["var(--background)", "var(--primary)"]The ground, then the metal's warm colour. Any CSS colour.
depthnumber1How far the metal stands out, 0.5–2.
shinenumber0.6How polished it is, 0 (satin) to 1 (mirror).
sizenumber1Reach of the light, 0.5–1.6.
ynumber0.45Where the word sits, from 0 (top) to 1 (bottom).
autoplaybooleantrueWhen nobody is near, the light circles slowly over the metal.
interactivebooleantrueThe light follows the pointer on a spring; pressing brings it closer.
momentnumber—Holds the light still where it circles to at this moment, in seconds.
captureRefRef<RelightHandle>—capture(width, height) resolves a PNG at any size.
...propsHTMLAttributes<HTMLDivElement>—Children sit above the metal and stay interactive.

Accessibility

  • The word 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.
  • With prefers-reduced-motion the light rests above the word and the pointer is ignored.
  • 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 word without the lighting.

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.