MenuClose

Spectrum Text — React Text Effect

A ribbon of daylight sliding through the words: one spectral gradient flows continuously across the type and leans toward the pointer.

View source
PreviewReact
Starting live preview

Usage

import { SpectrumText } from "@/components/SpectrumText";

export function Headline() {
  return <h1><SpectrumText text="Everything is light." speed={0.55}
    {...{
      text: "Everything is light.",
      speed: 0.55,
      bandWidth: 220
    }}
  /></h1>;
}
Implementation notes & API

Accepts text, speed, bandWidth, colors (hex string array), disabled, className and style. The text stays a real, selectable label; under reduced motion it rests as a still spectrum. No GPU dependency.

PropertyTypeNotes / default
childrenReactNodeYour own content; the default is a demonstration
disabledbooleanfalse; motion also respects system preferences
className / stylestring / CSSPropertiesApplied to the outer container
View source on GitHubFree for commercial projects · MIT