āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/elevenlabs/ui/components/shimmering-text ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
<ComponentPreview name="shimmering-text-demo" description="A text shimmer effect with customizable speed, intensity, and colors" />
npx @elevenlabs/cli@latest components add shimmering-text
</TabsContent>
<TabsContent value="manual">
<Steps>
<Step>Install the following dependencies:</Step>
npm install motion
<Step>Copy and paste the following code into your project.</Step>
<ComponentSource name="shimmering-text" title="components/ui/shimmering-text.tsx" />
<Step>Update the import paths to match your project setup.</Step>
</Steps> </TabsContent> </CodeTabs>import { ShimmeringText } from "@/components/ui/shimmering-text"
<ShimmeringText text="Hello, World!" />
<ShimmeringText
text="Custom Shimmer"
duration={3}
color="#6B7280"
shimmerColor="#3B82F6"
/>
<ShimmeringText
text="Appears when scrolled into view"
startOnView={true}
once={true}
/>
<ShimmeringText
text="Repeating Shimmer"
repeat={true}
repeatDelay={1}
duration={2}
/>
<ShimmeringText
text="Large Heading"
className="text-4xl font-bold"
spread={3}
/>
An animated text component with gradient shimmer effect and viewport detection.
| Prop | Type | Default | Description |
| ------------ | --------- | ------- | ---------------------------------------------------- |
| text | string | - | Required. Text to display with shimmer effect |
| duration | number | 2 | Animation duration in seconds |
| delay | number | 0 | Delay before starting animation |
| repeat | boolean | true | Whether to repeat the animation |
| repeatDelay | number | 0.5 | Pause duration between repeats in seconds |
| className | string | - | Optional CSS classes |
| startOnView | boolean | true | Whether to start animation when entering viewport |
| once | boolean | false | Whether to animate only once |
| inViewMargin | string | - | Margin for viewport detection (e.g., "0px 0px -10%") |
| spread | number | 2 | Shimmer spread multiplier |
| color | string | - | Base text color (CSS custom property) |
| shimmerColor | string | - | Shimmer gradient color (CSS custom property) |
useInView hookbackground-clip: text for gradient effectuseMemo for performanceā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā