Text Shimmer

A gradient that sweeps across text for loading labels or emphasis.

Preview

"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>
  );
}

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/text-shimmer

API Reference

as?
ElementType

Element to render the text as. Default: "span"

Defaultspan
duration?
number

Length of one shimmer sweep (s). Default: 2.5

Default2.5
className?
string

Classes merged onto the text element.

Default—
Also on React Native. Reveals, sweeps, shimmers, cascades and scrambles.

More in Text Animation

Updated