Background
Shooting Stars
Animated meteor shower effects with customizable colors and trajectories. Perfect for React applications requiring dynamic sky animations with Next.js integration and TypeScript support.
Installation
npx shadcn@latest add https://www.shadcn.io/registry/shooting-stars.json
npx shadcn@latest add https://www.shadcn.io/registry/shooting-stars.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/shooting-stars.json
bunx shadcn@latest add https://www.shadcn.io/registry/shooting-stars.json
Features
- Customizable star colors with hex color values for personalized visual themes
- Variable speed control configuring minimum and maximum ranges for natural movement patterns
- Adjustable timing intervals controlling delay between star appearances for different effects
- Multi-directional trajectories with stars appearing from random screen edges
- Scalable depth animation where stars grow larger as they travel for realistic perception
- Performance optimized using efficient SVG rendering with requestAnimationFrame
- Layerable effects supporting multiple instances for complex multi-color combinations
- TypeScript support with complete interface definitions for reliable integration
Examples
Multi-Color Effect
Use Cases
This free open source React component works well for:
- Hero sections - Dynamic sky effects for space-themed landing pages built with Next.js
- Gaming interfaces - Atmospheric backgrounds for space games and sci-fi applications using TypeScript
- Portfolio headers - Eye-catching animations showcasing creative capabilities
- Event websites - Dramatic backgrounds for conferences and product launches using shadcn/ui design
- Loading screens - Engaging animations during content loading and data processing
- Creative showcases - Artistic backgrounds for design portfolios using Tailwind CSS animations
API Reference
ShootingStars
Prop | Type | Default | Description |
---|---|---|---|
starColor | string | "#9E00FF" | Color of the shooting stars (hex format) |
trailColor | string | "#2EB9DF" | Color of the star trails (hex format) |
minSpeed | number | 10 | Minimum speed of star movement |
maxSpeed | number | 30 | Maximum speed of star movement |
minDelay | number | 1200 | Minimum delay between star appearances (ms) |
maxDelay | number | 4200 | Maximum delay between star appearances (ms) |
starWidth | number | 10 | Width of the star trail |
starHeight | number | 1 | Height of the star trail |
className | string | undefined | Additional CSS classes for the container |
Implementation Notes
- Component uses SVG-based rendering with requestAnimationFrame for smooth animations
- Stars appear from random screen edges with realistic diagonal trajectories
- Each star grows in size as it travels, creating natural depth perception effects
- Multiple instances can be layered with different colors and timing for complex effects
- Performance optimized using efficient DOM manipulation and memory management
- Compatible with shadcn/ui design system and responsive across all device sizes
- Animation timing randomized between minDelay and maxDelay for natural appearance
- Star colors customizable via hex values to match any design system or brand palette
Shape Landing Hero
Geometric hero sections with floating shapes and gradient text effects. Perfect for React landing pages requiring elegant visual impact with Next.js integration and TypeScript support.
Sparkles
Magical particle animations that bring websites to life. This interactive React component creates captivating sparkle effects perfect for Next.js applications requiring enchanting visual elements.