Text Ripple

A 3D character ripple with a traveling color crest, CSS-only and GPU-light.

textripple3dheadlineanimationtypographywave
Text Ripple component preview

Overview

Text Ripple is a React and Tailwind CSS wave text animation where a 3D crest travels through a headline, lifting, turning, and brightening each letter in turn, in Next.js or any React app, with only CSS keyframes. Only transform and color animate, the stagger is animation delay, and every letter shares one timeline. Depth, nudge, scale, rotation, and colors are props. Screen readers get the full text once, it stops when scrolled away or when the tab is hidden, and reduced motion shows a static fill. Keep it to short headlines, since each character is its own animated span.

Installation

Run the following command

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

Usage

Import TextRipple from @/components/wensity/text-ripple 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 { TextRipple } from "@/components/wensity/text-ripple";
export default function Example() {
return (
<TextRipple
as="h1"
text="Generating code ..."
duration={1}
spread={1}
className="font-display text-xl font-normal"
/>
);
}

Props

PropTypeDefaultDescription
textstring-The string to render.
askeyof React.JSX.IntrinsicElements"span"Tag rendered as the outer element.
durationnumber1Crest travel duration for one character, in seconds.
spreadnumber1How tightly the crest packs across characters (0.4–3). Higher = faster stagger.
zDistancenumber10Forward depth of the crest in CSS pixels.
xDistancenumber2Lateral nudge of the crest in CSS pixels.
yDistancenumber-2Vertical nudge of the crest in CSS pixels.
scaleDistancenumber1.1Peak scale at the crest.
rotateYDistancenumber10Peak Y rotation at the crest, in degrees.
baseColorstringthemeResting fill color. Omit for theme auto (zinc in light, softer zinc in dark).
rippleColorstringthemeCrest highlight color. Omit for theme auto (near-black in light, white in dark).
pausedboolean-Force the infinite loop paused. When omitted, it runs forever while visible and auto-pauses off-screen or when the tab is hidden.

Featured in React hero section components.