Light Lines
An animated background with flowing light trails that move along vertical lines. Creates a mesmerizing, futuristic atmosphere perfect for hero sections and landing pages.
Welcome
Install using CLI
npx shadcn@latest add "https://vengeance-ui.vercel.app/r/light-lines.json"Install Manually
1
Install dependencies
2
Add util file
lib/utils.ts
3
Copy the source code
Copy the code below and paste it into components/ui/light-lines.tsx
Usage
Examples
Purple Theme
Purple Theme
Cyber / Dark Theme
Cyber Theme
Fast Animation
Fast Mode
Props
| Prop Name | Type | Default | Description |
|---|---|---|---|
| className | string | "" | Additional CSS classes for the container. |
| linesOpacity | number | 0.05 | Opacity of the static background lines (0-1). |
| lightsOpacity | number | 0.9 | Opacity of the animated light trails (0-1). |
| speedMultiplier | number | 1 | Multiplier for animation speed. Higher = faster. |
| gradientFrom | string | "#2462F6" | Starting color of the background gradient. |
| gradientTo | string | "#5999F8" | Ending color of the background gradient. |
| lightColor | string | "#fff" | Color of the animated light trails. |
| lineColor | string | "#fff" | Color of the static background lines. |
| children | React.ReactNode | undefined | Content to overlay on top of the animation. |
Features
- Smooth Animations: Uses requestAnimationFrame for buttery 60fps animations
- Customizable Colors: Full control over gradient, lines, and lights colors
- Speed Control: Adjustable animation speed with speedMultiplier prop
- Content Overlay: Pass children to overlay content on top of the animation
- No External Dependencies: Uses native JavaScript animations, no GSAP required
- Performance Optimized: Efficient animation loop with cleanup on unmount
- Tailwind Integration: Uses cn() utility for class merging
- Responsive: SVG-based design scales to any container size
- Reusable: Pass any content as children to use as hero, loading screen, or background