
Text Shimmer
A CSS shimmer sweep for headlines, one single element and entirely GPU-friendly.
A hand-placed highlighter band that sweeps in behind your text and tracks wrapping.
Text Highlight is a React and Tailwind CSS highlighter animation that sweeps a marker band behind important words, in Next.js or any React app, with no dependencies. It measures the real text with Range rects, so the band follows every wrapped line and refits on resize and font load, and the sweep is one scaleX transition. Draw it once when it scrolls into view, on hover with a retract on leave, or control it with drawn. The text is server rendered as normal inline content and the band paints after hydration. Reduced motion draws it instantly.
Run the following command
pnpm dlx wensity@latest add text-highlight
npx wensity@latest add text-highlight
yarn dlx wensity@latest add text-highlight
bunx wensity@latest add text-highlight
Import TextHighlight from @/components/wensity/text-highlight 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.
import { TextHighlight } from "@/components/wensity/text-highlight";export default function Example() {return (<p className="font-display text-2xl text-zinc-900 dark:text-zinc-100">I think wensity has the{" "}<TextHighlight>best components</TextHighlight>{" "}on the internet.</p>);}
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | - | The inline content to highlight. |
color | string | chili (brand) | Marker color. Defaults to the Wensity brand (chili). |
opacity | number | 0.4 | Opacity of the marker band. |
duration | number | 0.9 | Seconds for the sweep. |
delay | number | 0 | Seconds to wait before sweeping. |
trigger | "view" | "hover" | "mount" | "view" | When to draw. View draws once on-screen; hover draws and retracts. |
padding | number | 2 | Extra px around the text before the band is drawn. |
drawn | boolean | - | Force the draw state. When omitted the trigger drives it; reduced motion always draws instantly. |
as | keyof JSX.IntrinsicElements | "span" | Outer element tag. |

A CSS shimmer sweep for headlines, one single element and entirely GPU-friendly.

A 3D character flip on hover, staggered and springy across every single letter.

Blur-morphing headlines that cycle phrases with a gooey, seamless crossfade.

A per-character slide-left cascade with a cleanly staggered entrance timing.
Featured in React text animations.