GitHub

Text shimmer wave

A wave of shimmer along text for animated placeholder copy.

TextShimmerWave animates each character through a small shimmer wave. It is the most expressive text loader, best reserved for assistant-style thinking states, short generated labels, and places where character-level motion supports the product language.

Thinking

import { TextShimmerWave } from "@/components/loading-ui/text-shimmer-wave";

export function TextShimmerWaveDemo() {

Installation

pnpm dlx shadcn@latest add @loading-ui/text-shimmer-wave

Usage

import { TextShimmerWave } from "@/components/loading-ui/text-shimmer-wave";
<TextShimmerWave>Thinking</TextShimmerWave>

Customization

Because every character moves independently, TextShimmerWave works best with short phrases. For longer labels, prefer TextShimmer.

Color

By default, the resting and active colors are derived from currentColor, so the wave works inside filled buttons and badges. Use baseColor and shimmerColor for explicit swatches.

Reading message

Drafting reply

Retrying answer

import { TextShimmerWave } from "@/components/loading-ui/text-shimmer-wave";

export function TextShimmerWaveColor() {

Duration

Shorter durations feel like active thinking; slower durations feel more ambient.

Fast response

Analyzing request

Deep read

import { TextShimmerWave } from "@/components/loading-ui/text-shimmer-wave";

export function TextShimmerWaveDuration() {

Motion

Tune depth, vertical lift, and rotation when you need the wave to feel subtler or more expressive.

Subtle wave

Default wave

Strong wave

import { TextShimmerWave } from "@/components/loading-ui/text-shimmer-wave";

export function TextShimmerWaveMotion() {

Examples

These examples keep the wave scoped to short assistant and drafting states so the moving characters stay readable.

Button

Buttons can use wave text as the full action label when the task is generating or composing.

import { Button } from "@/components/ui/button";
import { TextShimmerWave } from "@/components/loading-ui/text-shimmer-wave";

Badge

Badges are a good fit for compact AI or composing states.

ThinkingComposingReading
import { Badge } from "@/components/ui/badge";
import { TextShimmerWave } from "@/components/loading-ui/text-shimmer-wave";

Alert

Use an alert when the wave needs one short sentence of explanation.

import {
  Alert,
  AlertDescription,

Tabs

Tabs can separate a live reply from sources or supporting material that appears later.

Composing response

Keep wave text short so each character remains readable while it moves.

import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { TextShimmerWave } from "@/components/loading-ui/text-shimmer-wave";