Shimmer
Animated shimmer effect for text. Creates a gradient sweep animation.
Variants:
- "light" (default): muted foreground → muted highlight (dark text on light bg)
- "dark": gray-400 → foreground (darker sweep on light bg)
- "inverted": white text on dark backgrounds
- "metallic": chrome text for dark surfaces, with a slow champagne-to-steel sheen and a pause between sweeps
Usage
Best practices
Reach for
Shimmerfor in-progress *text* (a "Thinking…"/"Analyzing" sweep);Shineis an occasional attention flick on a surface, andSkeletonis a layout-shaped content placeholder.childrenmust be a plain string - the sweep is abg-clip-textgradient sized from character count, so element children won't clip correctly.Under reduced motion every variant renders its static base with no sweep. For finite "thinking" states set
repeat(e.g.repeat={2}) rather than leaving the default infinite loop running.variant="metallic"is built for dark surfaces only - on a light background the chrome ramp loses contrast. Its owndurationandrepeatDelaydefaults apply only when you pass neither.To sweep several lines in step, pass them one shared
progressmotion value (0-100) and drive it yourself; a Shimmer givenprogressnever animates on its own.
Props
Also exports
- interface
ShimmerProps - type
ShimmerVariant
Composition
Used by