Text Shimmer

A soft highlight that sweeps across text — perfect for loading, thinking and generating states.

Motion
  • Reading your codebase
  • Planning changes
  • Editing 4 files
  • Running tests

Playground

Tweak the props, the preview and the code follow.

Generating response…
Props
2
2
import { TextShimmer } from "@/components/ui/text-shimmer"

<TextShimmer className="text-3xl font-semibold">
  Generating response…
</TextShimmer>

Installation

npx @plumsydev/plum-ui add text-shimmer

Usage

import { TextShimmer } from "@/components/ui/text-shimmer"
<TextShimmer duration={1.5}>Thinking…</TextShimmer>

Examples

Duration & spread

Tune how fast the light travels and how wide it is.

Generating preview

2.0s
2

In a button

Swap a label for a shimmering status while work happens.

API Reference

TextShimmer

PropTypeDefault
children*

The text to shimmer.

string—
as

Element to render.

"span" | "p" | "div" | "h1" | "h2" | "h3""span"
duration

Seconds per sweep.

number2
spread

Highlight width, multiplied by the character count.

number2

Notes

  • Colors come from --muted-foreground (base) and --foreground (highlight). Override [--base:…] and [--shine:…] via className.