# Shimmer

Animated gradient utility for loading text.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

<ComponentPreview name="shimmer-demo" title="shimmer-demo.tsx">
<Component />
</ComponentPreview>

Shimmer is a registry component (`npx frakment add shimmer`) that also exposes a `shimmer` utility class. Apply the class to any text element to animate a gradient that signals a loading or streaming state.

## Installation [#installation]

```bash
npx frakment add shimmer
```

## Usage [#usage]

```tsx
<p className="shimmer">Generating response&hellip;</p>
```

## With Marker [#with-marker]

<ComponentPreview name="shimmer-marker" title="shimmer-marker.tsx">
<r />
</ComponentPreview>

## Color [#color]

Change the highlight color with `shimmer-color-[color]`.

<ComponentPreview name="shimmer-color" title="shimmer-color.tsx">
<l />
</ComponentPreview>

## Duration [#duration]

Change the animation duration with `shimmer-duration-[time]`.

<ComponentPreview name="shimmer-duration" title="shimmer-duration.tsx">
<h />
</ComponentPreview>

## Spread [#spread]

Change the gradient spread with `[--shimmer-spread:percent]`.

<ComponentPreview name="shimmer-spread" title="shimmer-spread.tsx">
<d />
</ComponentPreview>

## Angle [#angle]

Change the gradient angle with `[--shimmer-angle:deg]`.

<ComponentPreview name="shimmer-angle" title="shimmer-angle.tsx">
<o />
</ComponentPreview>

## Once [#once]

`shimmer-once` runs the animation once.

<ComponentPreview name="shimmer-once" title="shimmer-once.tsx">
<ShimmerOnce />
</ComponentPreview>

## Disable [#disable]

`shimmer-none` disables the animation. Combine with a breakpoint for responsive control.

<ComponentPreview name="shimmer-none" title="shimmer-none.tsx">
<p />
</ComponentPreview>

## Accessibility [#accessibility]

Shimmer is decorative. Pair it with a visible text label so the loading state is conveyed to screen readers.