Skip to content

Shimmer

The Shimmer component animates a sweep of light across text, most often to signal that content is still generating in AI and chat interfaces. It wraps a single string of text and renders it as any element you choose.

Variations

With different duration

Control the animation speed with the duration prop (in seconds).

With different spread

The spread prop controls the width of the shimmer highlight (multiplied by the text length). Higher values create a wider band of light.

With different colors

Use the color prop to change the shimmer text color. It uses the same color tokens as the Text component.

Custom element type

Use the as prop to render the shimmer as a different HTML element.

Installation

import { Shimmer } from '@harnessio/ui/components'
// Basic usage
<Shimmer>Generating response...</Shimmer>
// With custom color
<Shimmer color="foreground-1">
Processing your request...
</Shimmer>
// With custom duration and spread
<Shimmer duration={3} spread={3} color="brand">
Loading...
</Shimmer>
// As a different element
<Shimmer as="h2" variant="heading-base">
Loading title...
</Shimmer>