Text Shimmer

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

textshimmerheadlineanimationtypographygradient
Text Shimmer component preview

Props

PropTypeDefaultDescription
textstring-The string to render.
askeyof React.JSX.IntrinsicElements"span"Tag rendered as the outer element.
durationnumber2Sweep duration in seconds. Lower = faster.
delaynumber0Hold at the end of each sweep before restarting, in seconds.
direction"left" | "right""left"Sweep travel direction.
yoyobooleanfalsePing-pong the sweep instead of looping in one direction.
pauseOnHoverbooleanfalsePause the loop while the pointer is over the text.
baseColorstringthemeResting fill color. Omit for theme auto (zinc in light, softer zinc in dark).
shimmerColorstringthemeBright highlight color. Omit for theme auto (near-black in light, white in dark).
spreadnumber22Band half-width scale (8–60). Converted to px from text length so the shine stays proportional.
anglenumber90Gradient angle in degrees.
pausedboolean-Force the infinite loop paused. When omitted, it runs forever while visible and auto-pauses off-screen or when the tab is hidden.