3D wave shimmer effect that ripples a color flash through each character sequentially with perspective transforms.
Installation
Usage
How It Works
- Each character is wrapped in an individual
motion.spanthat animates on its own staggered delay. - The wave is created by offsetting each character's animation start by
(i * duration) / (text.length * spread). spreadcontrols how many wave cycles fit across the full text at once — higher values compress the wave.zDistance,xDistance, andyDistancedefine the 3D translation peak at the top of each character's wave.scaleDistancebriefly scales up the character at the shimmer peak.rotateYDistancetilts the character on its Y axis for a 3D flip feel.- The
colorandshimmerColoranimate between base and highlight at the same cadence.
API Reference
TextShimmerWave
| Prop | Type | Default |
|---|---|---|
children | string | - |
as? | React.ElementType | "p" |
className? | string | - |
color? | string | "#a1a1aa" |
shimmerColor? | string | "#ffffff" |
duration? | number | 1 |
zDistance? | number | 10 |
xDistance? | number | 2 |
yDistance? | number | -2 |
spread? | number | 1 |
scaleDistance? | number | 1.1 |
rotateYDistance? | number | 10 |
transition? | Transition | - |