Wensity Labs

Text Chroma Reveal

Text 20

About

A headline reveal that paints text into view with a sweeping chromatic gradient ribbon. Loop through several phrases or reveal once, with reduced motion support.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Text Chroma Reveal to your project and fits it to your theme.

Code

How Text Chroma Reveal is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import * as React from "react";
import { TextChromaReveal } from "@/components/ui/text-chroma-reveal";

type Palette = "spectrum" | "chili" | "aurora";

const PALETTES: Record<Palette, string[]> = {
  spectrum: ["#c679c4", "#fa3d1d", "#ffb005", "#e1e1fe", "#0358f7"],
  chili: ["#ff6b4a", "#fa3d1d", "#ffb005", "#ffe0a3"],
  aurora: ["#22d3ee", "#a78bfa", "#f472b6", "#34d399"],
};

const settings = {
  text: "Wensity UI",
  phrases: "Wensity UI, design, ship, scale",
  duration: 1.5,
  delay: 0,
  holdDuration: 1,
  fadeDuration: 0.6,
  repeatDelay: 0.5,
  direction: "ltr",
  palette: "spectrum",
  repeat: true,
  fixedWidth: false,
  replay: 0,
};

const previewClass =
  "font-display text-[clamp(1.75rem,5vw,3rem)] font-extrabold tracking-tight text-foreground";

function parsePhrases(raw: string, fallback: string) {
  const phrases = raw
    .split(",")
    .map((part) => part.trim())
    .filter(Boolean);
  return phrases.length > 0 ? phrases : [fallback];
}

export function TextChromaRevealPreview(props: Partial<typeof settings> = {}) {
  const state = { ...settings, ...props };
  const phrases = parsePhrases(state.phrases, state.text || settings.text);

  return (
    <div className="grid min-h-[360px] w-full place-items-center px-6 py-12 sm:px-10">
      <TextChromaReveal
        key={state.replay}
        text={state.repeat ? phrases : state.text || settings.text}
        colors={PALETTES[state.palette]}
        direction={state.direction}
        duration={state.duration}
        delay={state.delay}
        holdDuration={state.holdDuration}
        fadeDuration={state.fadeDuration}
        repeatDelay={state.repeatDelay}
        repeat={state.repeat}
        fixedWidth={state.fixedWidth && state.repeat}
        startOnView={false}
        once={false}
        className={previewClass}
      />
    </div>
  );
}

export default function Demo(props: Partial<typeof settings>) {
  return <TextChromaRevealPreview {...props} />;
}

Dependencies

More by Wensity Labs

View all
  • Sidebar

    Sidebar

    422
  • Calendar

    Calendar

    309
  • Button

    Button

    151
  • Color Picker

    Color Picker

    103
  • AI Prompt Input

    AI Prompt Input

    87
  • Image Comparison Slider

    Image Comparison Slider

    86
  • Text Morphing

    Text Morphing

    65
  • Carousel

    Carousel

    59

More in Text

View all
  • Vertical Cut Reveal Characters

    Vertical Cut Reveal Characters

    134
  • Astryx Chat Tokenized Text

    Astryx Chat Tokenized Text

    9
  • Text Reveal

    Text Reveal

    31
  • Rainbow Text Effect

    Rainbow Text Effect

    61
  • Scroll Fill Headline

    Scroll Fill Headline

    44
  • Shine Border

    Shine Border

    1K
  • Split text

    Split text

    79
  • Motion Blur Text

    Motion Blur Text

    47