Background Beams
Animated SVG background beams with customizable gradient colors and animation speed. Perfect for hero sections and landing pages. Works seamlessly in both dark and light themes.
Preview
Beautiful Beams
Installation
Use the CLI to add this component to your project.
Usage
tsx
16 linesCopy
Color Schemes
Purple
Purple Theme
Green
Green Theme
Orange
Orange Theme
Pink
Pink Theme
Animation Options
Fast Animation (2x speed)
2x Speed
Reverse Direction
Reversed
Custom Colors
Custom Gradient
Props
| Prop | Type | Default | Description |
|---|---|---|---|
colorScheme | 'cyan' | 'purple' | 'green' | 'orange' | 'pink' | 'custom' | cyan | Color theme preset for the beam gradients |
customColors | { start: string, middle: string, end: string } | undefined | Custom gradient colors (only used when colorScheme is 'custom') |
speed | number | 1 | Animation speed multiplier (2 = 2x faster, 0.5 = half speed) |
beamOpacity | number | 0.5 | Opacity of the animated beams (0 to 1) |
beamCount | number | 50 | Number of animated beams to display (1 to 50) |
reverse | boolean | false | Animate beams in reverse direction |
strokeWidth | number | 0.75 | Width of the beam strokes |
className | string | undefined | Additional CSS classes for the container |