Shimmer Text

A premium text component with a continuous shimmer effect flowing within the text itself.

The ShimmerText component creates a smooth, continuous shimmer effect that flows within the text characters. The shimmer loops infinitely, creating an elegant effect perfect for headings and taglines.

Preview

Build beautiful interfaces

Installation

$ npx shadcn@latest add https://spark-ui-olive.vercel.app/r/shimmer-text.json

Usage

import { ShimmerText } from "@/components/shimmer-text";
export default function ShimmerTextDemo() {
  return (
    <div className="flex items-center justify-center py-12 px-6">
      <ShimmerText
        variant="default"
        duration={2}
        className="text-4xl md:text-5xl"
      >
        Build beautiful interfaces
      </ShimmerText>
    </div>
  );
}

Variants Preview

Build beautiful interfacesBuild beautiful interfacesBuild beautiful interfacesBuild beautiful interfaces

Properties

PropTypeDefaultDescription
childrenReact.ReactNodeThe text content to display with shimmer effect.
classNamestringAdditional CSS classes for styling (text size, weight, etc.).
shimmerColorstringPrimary shimmer color (overrides variant). Hex format.
shimmerColor2stringSecondary shimmer color for gradient effect. Hex format.
direction"ltr" | "rtl""ltr"Direction of shimmer animation (left-to-right or right-to-left).
durationnumber2Duration of one complete shimmer cycle in seconds.
delaynumber0Delay before the animation starts in seconds.
shimmerWidthnumber0.5Width of the shimmer band (0.1 - 1). Higher values create wider shimmer.