---
title: "Text Shimmer"
description: "Free React text shimmer: a gradient sweeps across the text for loading labels or emphasis. Set the sweep duration. Framer Motion, Tailwind, shadcn install."
category: "Components"
parent: "https://beui.dev/components/motion/text-animation"
publishedAt: "2026-05-17"
updatedAt: "2026-11-24"
documentation: "https://beui.dev/components/motion/text-animation/shimmer"
markdown: "https://beui.dev/components/motion/text-animation/shimmer.md"
license: "MIT"
---

# Text Shimmer

> Free React text shimmer: a gradient sweeps across the text for loading labels or emphasis. Set the sweep duration. Framer Motion, Tailwind, shadcn install.

## Install

```bash
npx shadcn@latest add @beui/text-shimmer
```

## Dependencies

- `clsx`
- `react`
- `tailwind-merge`

## Usage

### Text Shimmer usage

Gradient sweep across text for loading or emphasis.

```tsx
"use client";

import { TextShimmer } from "@/components/motion/text-shimmer";

export function TextShimmerPreview() {
  return (
    <div className="flex flex-col gap-4">
      <TextShimmer className="text-3xl font-semibold">Loading projects…</TextShimmer>
      <TextShimmer duration={1.5} className="text-sm">Faster shimmer</TextShimmer>
    </div>
  );
}
```

## API Reference

### TextShimmer

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `as` | `ElementType` | `span` | No | Element to render the text as. Default: "span" |
| `duration` | `number` | `2.5` | No | Length of one shimmer sweep (s). Default: 2.5 |
| `className` | `string` | — | No | Classes merged onto the text element. |

## More in Text Animation

- [Text Scramble](https://beui.dev/components/motion/text-animation/text-scramble.md)
- [Dia Text Animation](https://beui.dev/components/motion/text-animation/chromatic-reveal.md)
- [Text Reveal](https://beui.dev/components/motion/text-animation/reveal.md)
- [Text Cascade](https://beui.dev/components/motion/text-animation/cascade.md)

## Source

- Registry detail: https://beui.dev/r/text-shimmer
- Raw source: https://beui.dev/r/text-shimmer/raw
- GitHub: https://github.com/starc007/ui-components
