iconiq

Shimmer Text

Shimmer highlight across one line—with adjustable speed and spread.

Agent is thinking ...

Installation

npx shadcn@latest add @iconiq/shimmer-text

Props

TextShimmer

5 props

Animated text treatment that moves a highlight band across one string of copy while keeping the base text readable in both light and dark themes.
childrenstring
Required
The text content to shimmer. The component expects a string because it derives the highlight spread from the child length.
asReact.ElementType
Default"p"
Changes which HTML element gets rendered while preserving the same shimmer animation behavior.
classNamestring
Merged onto the motion element for local typography, spacing, or color-variable overrides.
durationnumber
Default2
Duration in seconds for one full shimmer sweep from right to left.
spreadnumber
Default2
Multiplier used to size the highlight band based on the current text length.

Notes

The component memoizes the computed spread width so it only recalculates when the string content or spread value changes.
Base and highlight colors come from internal CSS custom properties, which can still be overridden through className if you want a different shimmer tone.