Animated gradient shimmer text with viewport-triggered and repeating animation support.
Made by LéoInstallation
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | — | Text to display with the shimmer effect. |
duration | number | 2 | Shimmer sweep duration in seconds. |
delay | number | 0 | Delay before the animation starts. |
repeat | boolean | true | Whether the shimmer repeats infinitely. |
repeatDelay | number | 0.5 | Pause between repeats in seconds. |
startOnView | boolean | true | Start animation when the element enters the viewport. |
once | boolean | false | Only animate once when entering the viewport. |
inViewMargin | string | — | Root margin for the in-view observer. |
spread | number | 2 | Shimmer spread multiplier (scales with text length). |
color | string | — | Override the base text color CSS value. |
shimmerColor | string | — | Override the shimmer highlight color CSS value. |
className | string | — | Additional CSS classes. |