- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Label
- Marker
- Menubar
- Message
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner (Toast)
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Tooltip
Shimmer
Utilities for adding a shimmer effect to text elements.
Generating response…
<p class="text-muted-foreground shimmer text-sm">Generating response…</p>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.
| Class | What it does |
|---|---|
shimmer | Sweeping text highlight loop |
shimmer-once | Play a single sweep |
shimmer-reverse | Sweep in the opposite direction |
shimmer-none | Disable 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.
<div hlmMarker role="status">
<span hlmMarkerIcon>
<hlm-spinner />
</span>
<span hlmMarkerContent class="shimmer">Thinking...</span>
</div>
<div hlmMarker variant="separator" role="status">
<span hlmMarkerContent class="shimmer">Reading 4 files</span>
</div>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…
<p class="shimmer shimmer-color-blue-500/60">Generating response…</p>
<p class="shimmer shimmer-color-[#378ADD]">Generating response…</p>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
<p class="shimmer shimmer-duration-1000">Generating response…</p>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
<p class="shimmer shimmer-spread-24">Generating response…</p>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
<p class="shimmer shimmer-angle-45">Generating response…</p>Play Once
Use shimmer-once to play a single sweep instead of looping. Remount the element to replay.
Generating response…
<p class="shimmer shimmer-duration-1100 shimmer-once text-muted-foreground text-sm">
Generating response…
</p>Disabling the Shimmer
Use shimmer-none to turn the effect off. It works in any class order.
Generating response…
shimmer md:shimmer-none
<p class="shimmer md:shimmer-none">Generating response…</p>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"
<p class="shimmer" dir="ltr">Generating response…</p>
<p class="shimmer" dir="rtl">جارٍ إنشاء الرد…</p>On This Page