Make your AI a shadcn expert

Shadcn Shimmer

React shimmer for loading labels and live status text. Built with TypeScript and Tailwind CSS for Next.js using Base UI — a highlight that sweeps currentColor.

A shimmer is a highlight that sweeps across text. Put shimmer on the line. The band is derived from currentColor, so muted copy and brand colors both work.

Scroll to load preview...

Usage

<p className="shimmer text-muted-foreground">Generating response…</p>

The class is a CSS utility. No component import.

Composition

shimmer
shimmer-once
shimmer-none

Ships in the shadcn Tailwind file. Same package as scroll-fade.

With Marker

A live status in a Marker. Spinner plus shimmering copy.

Scroll to load preview...

Color

shimmer-color-blue-500/60 or an arbitrary value. Default follows the text color.

Scroll to load preview...

Duration

shimmer-duration-1000 is one second per sweep. Default is 2000.

Scroll to load preview...

Spread

shimmer-spread-24 sets the band width. Default is 3ch + 40px.

Scroll to load preview...

Angle

shimmer-angle-45 tilts the band. Default is 20.

Scroll to load preview...

Play Once

shimmer-once for a single reveal when streaming finishes.

Scroll to load preview...

Disabling the Shimmer

shimmer-none turns it off. Works in any class order.

Scroll to load preview...

RTL

The sweep follows reading direction. shimmer-reverse flips it by hand.

Scroll to load preview...

API

ClassWhat it does
shimmerLoop the highlight
shimmer-onceOne sweep
shimmer-reverseOpposite direction
shimmer-noneOff
shimmer-color-*Highlight color
shimmer-duration-*ms per sweep
shimmer-spread-*Band width
shimmer-angle-*Tilt in degrees

Notes

Prefers-reduced-motion is automatic

The animation stops and the text renders normally. Do not add a second reduced-motion rule.

With other components

Questions

Was this page helpful?

Sign in to leave feedback.