Shimmer

Utilities for adding a shimmer effect to text elements.

Generating response…

Installation

shimmer ships with Spartan's Tailwind preset ( hlm-tailwind-preset.css ). Projects set up with the Spartan CLI already have it — no extra install step.

Usage

Add shimmer to a text element. The effect is built on currentColor , so it adapts to muted text, brand colors, and dark mode automatically. It is disabled when prefers-reduced-motion: reduce is set, so you do not need your own motion guard.

ClassWhat it does
shimmerSweeping text highlight loop
shimmer-oncePlay a single sweep
shimmer-reverseSweep in the opposite direction
shimmer-noneDisable the effect
shimmer-color-*Explicit highlight color
shimmer-duration-*Sweep duration in milliseconds
shimmer-spread-*Width of the highlight band
shimmer-angle-*Tilt of the highlight band in degrees

With Marker

A common pattern is a Marker showing a live status while the assistant is working.

Thinking...
Reading 4 files

Color

Use shimmer-color-* to set the highlight color explicitly. It accepts theme colors with an optional opacity modifier, or any arbitrary color value.

Generating response…

Generating response…

Duration

Use shimmer-duration-* to set the duration of one sweep in milliseconds. The default is 2000 .

Generating response…

shimmer

Generating response…

shimmer-duration-1000

Spread

Use shimmer-spread-* to set the width of the highlight band using the spacing scale.

Generating response…

shimmer-spread-4

Generating response…

shimmer-spread-24

Angle

Use shimmer-angle-* to set the tilt of the highlight band in degrees. The default is 20 .

Generating response…

shimmer

Generating response…

shimmer-angle-45

Play Once

Use shimmer-once to play a single sweep instead of looping. Remount the element to replay.

Generating response…

Disabling the Shimmer

Use shimmer-none to turn the effect off. It works in any class order.

Generating response…

shimmer md:shimmer-none

RTL

The sweep follows the reading direction — left to right in LTR and right to left in RTL — with no extra classes. Use shimmer-reverse to flip the direction manually.

Generating response…

dir="ltr"

جارٍ إنشاء الرد…

dir="rtl"

Forms Scroll Fade