Charcoal UI

Shimmer Text

A band of light sweeps across text. Good for loading or thinking states.

  • Category: Text
  • Licence: Free, MIT
  • Built with: React 19, Tailwind CSS 4, Motion
  • Dependencies: motion, clsx, tailwind-merge

Examples

Shimmer Text

API reference

PropTypeDefaultDescription
childrenstring—
durationnumber2.4

About Shimmer Text

Shimmer Text sweeps a band of light across text, the loading look AI products use for "Thinking…" and "Generating…". It is subtle enough to sit in a chat line and still says that something is happening.

Shimmer Text is a text animation for React 19, styled with Tailwind CSS 4 and animated with Motion. It drops into Next.js, Vite, Remix or Astro through the shadcn CLI as a single file you own.

When to use Shimmer Text

  • AI thinking and generating states.
  • Loading labels in buttons and lists.
  • Highlighting a new feature name.
  • Skeleton text that still reads.

How it works

It is a CSS background-clip text gradient animated across the word, so it costs nothing to run. duration sets the sweep speed, and reduced motion shows the text plainly.

The real text stays in the page for screen readers and search engines; the animated letters are decorative copies marked aria-hidden. With prefers-reduced-motion on, it holds still or settles instantly instead of animating.

Customizing Shimmer Text

Every prop is documented in the API reference above with its type and default. The ones you will reach for first are listed here.

The Customize panel next to the preview lets you change text, duration live, and the Code tab updates to match, so the snippet you copy already carries your values.

  • duration (number, default 2.4).

Goes well with Shimmer Text

Shimmer Text is already composed into a ready-made section, so you can see it in context or install the whole block.

  • Hero Landscape: Hero section
  • Text Reveal: A React text reveal: words rise out of a blur one after another as they scroll in
  • Typewriter: A React typewriter effect with a human rhythm that types, holds and deletes words
  • Gradient Text: React gradient text with a slowly flowing accent gradient, CSS only
  • Scramble Text: React scramble text: characters cycle through glyphs before locking in
  • Rotating Text: React rotating text that rolls between words letter by letter and resizes smoothly

Install Shimmer Text

npx shadcn@latest add https://charcoalui.com/r/shimmer-text.json

Shimmer Text is free and MIT licensed. The command copies shimmer-text.tsx into components/ui and installs clsx, tailwind-merge; you can also copy the source from the Code tab by hand.

It pairs well with Organic Shimmer, a Pro piece: A shimmer whose band ripples like heat haze with a glowing edge, moved by transform so it composites.

Frequently asked questions

How do I install Shimmer Text?
Run npx shadcn@latest add https://charcoalui.com/r/shimmer-text.json. The shadcn CLI copies shimmer-text.tsx into components/ui and installs motion, clsx, tailwind-merge. You can also copy the source from this page by hand.
Is Shimmer Text free for commercial use?
Yes. Shimmer Text is MIT licensed: use it in any personal or commercial project and change it however you like.
Does Shimmer Text work with Next.js?
Yes. It is a client component for React 19 styled with Tailwind CSS 4, so it works in the Next.js App Router and Pages Router, Vite, Remix and Astro.
Can an AI coding agent install Shimmer Text?
Yes. Connect the Charcoal UI MCP server (https://charcoalui.com/mcp) to Claude Code, Cursor or any MCP client; get_component returns Shimmer Text's props and source and get_install_command returns the exact command.

Shimmer Text as Markdown · llms.txt