Background
Spiral Animation
Mesmerizing spiral animations with GSAP-powered smooth motion. Perfect for React applications requiring hypnotic visual effects with Next.js integration and TypeScript support.
Powered by
Installation
npx shadcn@latest add https://www.shadcn.io/registry/spiral-animation.json
npx shadcn@latest add https://www.shadcn.io/registry/spiral-animation.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/spiral-animation.json
bunx shadcn@latest add https://www.shadcn.io/registry/spiral-animation.json
Features
- Canvas-based rendering with high-performance spiral animations using HTML5 Canvas API
- GSAP timeline integration delivering smooth, professional-grade motion with precise timing control
- Responsive adaptation automatically adjusting to window resize events and container changes
- Tailwind CSS compatibility enabling easy customization through utility classes
- Zero external dependencies requiring no additional CSS files or external stylesheets
- TypeScript support with complete interface definitions for reliable integration
- Performance optimized using efficient canvas operations and hardware acceleration
- Customizable parameters allowing control over spiral density, speed, and visual properties
Use Cases
This free open source React component works well for:
- Loading screens - Hypnotic animations capturing user attention during data processing built with Next.js
- Hero sections - Eye-catching spiral effects for creative landing pages using TypeScript
- Art installations - Interactive visual experiences for galleries and creative showcases
- Gaming interfaces - Atmospheric backgrounds for puzzle games and meditation apps using shadcn/ui design
- Brand experiences - Unique visual identity elements for creative agencies and studios
- Portfolio headers - Artistic animations showcasing design capabilities using Tailwind CSS effects
API Reference
SpiralAnimation
Prop | Type | Default | Description |
---|---|---|---|
className | string | undefined | Additional CSS classes for the canvas |
width | number | 400 | Canvas width in pixels |
height | number | 400 | Canvas height in pixels |
Implementation Notes
- Component requires GSAP library for smooth timeline animations and motion control
- Canvas automatically adapts to container dimensions and window resize events
- Spiral animation uses mathematical calculations for precise geometric patterns
- Performance optimized using requestAnimationFrame and efficient canvas rendering
- Compatible with shadcn/ui design system and responsive across all device sizes
- GSAP timeline provides smooth easing and professional motion characteristics
- No external CSS required, all styling handled through component props and Tailwind classes
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.
Squares
Interactive animated grid patterns with hover effects and directional movement. Perfect for React applications requiring geometric backgrounds with Next.js integration and TypeScript support.