A fluid, luminous text component with continuous dynamic light beam reflections and customizable gradient sweeps.
Subtle light reflections sliding over typography to captivate attention and emphasize key narratives.
$ npx shadcn@latest add https://akshitr.com/r/shimmer-text.json
import ShimmerText from "@/components/shimmer-text";
export default function Example() {
return (
<ShimmerText duration={2.5} className="text-4xl font-bold">
Luminous Shimmer Effect
</ShimmerText>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
children | string | — | The text string to shimmer. |
as? | "span" | "p" | "div" | "h1" | "h2" | "h3" | ... | "span" | The HTML element tag to render as. |
duration? | number | 2.5 | Shimmer cycle duration in seconds. |
shimmerColor? | string | var(--color-foreground) | Custom highlight reflection color. |
band? | string | "400%" | Width percentage of the gradient band. |
spread? | number | 15 | Width spread percentage of the beam reflection. |
easing? | string | "linear" | CSS cubic-bezier or easing timing curve for the sweep animation. |
className? | string | — | Additional classes applied to the base element. |