Shimmer
A light sweep for loading text and skeletons. Every band on the page can move in sync.
shimmer shimmer-syncInstall
Add the utility's CSS with the CLI, your coding agent, or by hand. It has no JavaScript.
Usage
Use shimmer on text, shimmer-block on a box, and shimmer-mask on anything else. Remove the class when the work is done.
Kinds
One band of light, three ways to draw it: on text, on a box, and through a mask.
- Thinking about itText
shimmerStatus lines while work runs.
- Block
shimmer-blockSkeletons. A composited sweep, cheap on the main thread.
- Mask
shimmer-maskAny element, icons and images too.
In sync
Put shimmer-sync-root on a parent and shimmer-sync on each band. All bands then move as one sweep.
shimmer-sync-root + shimmer-syncshimmer-block aloneOptions
The modifier classes of the utility. Put them next to the shimmer class on the text.
| Name | Kind | Default | Description |
|---|---|---|---|
shimmer-duration-<ms> | class | 2000 | The time of one sweep, in milliseconds. |
shimmer-color-* | class | current color | The color of the band. Any theme color. |
shimmer-spectrum | class | — | A band in the aurora colors, for AI moments. |
shimmer-strength-<n> | class | 80 | How bright the band is, in percent. |
shimmer-paused · -once · -reverse | class | — | Stop the sweep, run it one time, or run it from the end. |
shimmer-sync-root · shimmer-sync | class | — | Bands under one root move as one sweep. |
- Typeset
typesetOne class styles the plain HTML of an article or a page.
- Materials
material-brushed-aluminumMetal, glass, stone, and cloth surfaces that catch the light.
- Pattern
pattern-hatchHatch, dots, grid, and checker for empty or reserved areas.
- Shape
shape-zigzagCut the edges or corners of any box: zigzag, scallop, notch.
- Glow
glowA soft halo in the element's own color, for bars and lines.
- Scroll Fade
scroll-fadeFade the edges of a scroll area, only where it can scroll.