TextShimmer sweeps a highlight across a line of text. It feels more polished
than dots or blinking, so it is a good fit for generated summaries, AI copy,
document scanning, and premium-feeling loading labels.
Thinking
Installation
Usage
import { TextShimmer } from "@/components/loading-ui/text-shimmer";<TextShimmer>Thinking</TextShimmer>Customization
TextShimmer uses a text-clipped gradient. Keep the copy short enough that the
sweep reads as progress instead of becoming a decorative headline.
Color
By default, TextShimmer derives both colors from currentColor, so it follows
filled buttons, badges, and muted text automatically. Use baseColor and
shimmerColor directly when you need explicit swatches.
Scanning document
Preparing export
Retrying upload
Duration
Longer copy usually benefits from a slightly slower sweep.
Fast scan
Generating summary
Slow background read
Spread
spread controls how wide the bright part of the sweep becomes.
Narrow highlight
Default highlight
Broad highlight
Examples
These examples use shimmer where the text itself is the loading surface: generated labels, assistant copy, and scan states.
Button
Inside filled buttons, the shimmer follows the button foreground automatically.
Badge
Shimmer badges are useful for generated or indexing states without adding a separate icon.
Input Group
Input addons can show that a prompt, query, or answer is being assembled.
Alert
Use alerts when the shimmer headline needs supporting context.