Text Chroma Reveal

A chromatic ribbon sweep that paints each of your headlines cleanly into view.

textchromarevealgradientspectrumheadlineanimationtypography
Text Chroma Reveal component preview

Overview

Text Chroma Reveal is a React and Tailwind CSS text reveal animation where a band of spectrum colors paints a headline into view, in Next.js or any React app, built on Framer Motion. The ribbon is painted through the letters with background clip, so it is one element with no per letter spans. Pass one phrase or several to rotate with hold and fade timing, start it on scroll, and replay it through a ref. Rotating phrases are announced politely, and reduced motion shows the text directly. Turn on fixedWidth when rotating, or shorter phrases shift the layout.

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest add text-chroma-reveal

Usage

Import TextChromaReveal from @/components/wensity/text-chroma-reveal and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.

app/example.tsx
import { TextChromaReveal } from "@/components/wensity/text-chroma-reveal";
export default function Example() {
return (
<TextChromaReveal
text={["design", "ship", "scale"]}
colors={["#c679c4", "#fa3d1d", "#ffb005", "#e1e1fe", "#0358f7"]}
repeat
fixedWidth
className="font-display text-4xl font-semibold"
/>
);
}

Props

PropTypeDefaultDescription
textstring | string[]-Phrase or rotating phrases to reveal.
as"span" | "p" | "div" | "h1"–"h6""span"Tag rendered as the outer element.
colorsstring[]spectrumChromatic ribbon colors across the reveal band.
textColorstring"currentColor"Final revealed text color.
direction"ltr" | "rtl""ltr"Sweep direction across the text.
durationnumber1.5Reveal sweep duration in seconds.
delaynumber0Delay before the sweep starts, in seconds.
repeatbooleanfalseCycle phrases / replay after hold + fade.
holdDurationnumber1Hold fully revealed before fading, in seconds.
fadeDurationnumber0.6Fade-out duration between cycles, in seconds.
repeatDelaynumber0.5Pause after fade before the next sweep, in seconds.
fixedWidthbooleanfalseLock width to the longest phrase so rotating text does not shift layout.
startOnViewbooleantrueWhen true, wait for viewport entry. When false, play on mount.
oncebooleantruePlay only once when using viewport trigger.

Featured in React hero section components.