Documentation
Text Effectstextrevealshimmer
Lightning Text
Text with Lightning effect animation .
lightning-text.tsx
Lightning
Installation
Terminal
1npx shadcn@latest add "https://sniper-ui-coral.vercel.app/r/lightning-text.json"Auto-Installed Dependencies
The CLI will automatically install these packages.
Terminal
1npm install gsapUsage
Basic
page.tsx
1import { LightningText } from "@/components/ui/lightning-text";
2
3export default function MyPage() {
4 return (
5 <LightningText>
6 Hello World
7 </LightningText>
8 );
9}Examples
examples.tsx
1import { LightningText } from "@/components/ui/lightning-text";
2
3export default function MyPage() {
4 return (
5 <div className="space-y-4">
6 {/* Custom color and speed */}
7 <LightningText color="#ff6b35" repeatDelay={0.8} stagger={0.02}>
8 <h1 className="text-5xl font-bold">Fast Lightning</h1>
9 </LightningText>
10
11 {/* Slower, blue effect */}
12 <LightningText color="#2b6bbb" repeatDelay={2} stagger={0.06}>
13 <p className="text-2xl">Subtle shimmer effect</p>
14 </LightningText>
15 </div>
16 );
17}Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | — | The content to apply the lightning effect to. |
color | string | "#2b6bbb" | The color of the lightning flash. |
repeatDelay | number | 1.5 | Seconds to wait before repeating the animation. |
stagger | number | 0.04 | Stagger delay (in seconds) between each character's animation. |

Sniper UI
An open-source library available on GitHub — contribute or star the repo to support it.
Categories