Generating response…
``` The shimmer is built on `currentColor`, so it adapts to the element: - The highlight is derived from the text color, with no configuration needed. - It works on any color, from `text-muted-foreground` to brand colors. - In dark mode, the highlight automatically brightens to stay visible. The effect is pure CSS. The text is painted with `background-clip: text`, and the highlight sweeps across it in a seamless loop. ## With Marker The shimmer composes with any component that renders text. A common pattern is a [Marker](/docs/components/marker) showing a live status while the assistant is working:Generating response…
Generating response…
``` ## Duration Use `shimmer-duration-Generating response…
``` ## Spread Use `shimmer-spread-Generating response…
``` For one-off values, use an arbitrary length or percentage: ```tsxGenerating response…
``` ## Angle Use `shimmer-angle-Generating response…
``` ## Reverse Use `shimmer-reverse` to sweep the highlight in the opposite direction. In RTL layouts the sweep already follows the reading direction. See [RTL](#rtl). ```tsxGenerating response…
``` ## Play Once Use `shimmer-once` to play a single sweep instead of looping, useful as a reveal when streaming completes. Pair it with `shimmer-duration-Response generated.
``` ## Disabling the Shimmer Use `shimmer-none` to turn the effect off and render the text normally. It works in any class order, so the typical use is responsive or stateful:Generating response…
``` ## Fallback The shimmer is built on modern color features, [relative color syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_colors/Relative_colors) and `color-mix()`, which are available in all current browsers. In older browsers without support, the highlight gradient is dropped and the text can render transparent. If you target older browsers, apply `shimmer` conditionally with a `supports-*` variant: ```tsxGenerating response…
``` ## Reduced Motion When the user prefers reduced motion, the animation is disabled automatically and the text renders normally. There is nothing to configure. ## RTL To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/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.