Directory
- Welcome
Moving Carousel Component
The Moving Carousel component creates smooth, infinite-scrolling content displays powered by GSAP animations. Perfect for showcasing logos, testimonials, or any repeating content that benefits from continuous motion.
Live Demo
TypeScript
Strongly typed programming language that builds on JavaScript
Powerful animation library for creating complex animations
Cloudflare Pages
Secure and fast hosting solution with a generous free tier.
Reliable and scalable database solution.
Modern static site generator with island architecture for optimal performance
Utility-first CSS framework for rapid UI development
Key Features
-
Infinite Scroll: Seamless looping animation
-
Pause on Hover: Interactive pause/resume functionality
-
Touch Support: Mobile-friendly interaction
-
Customizable Speed: Adjustable scroll speed
Implementation
Basic usage with default settings:
<CarouselMoving> <div class="carousel-item">Content 1</div> <div class="carousel-item">Content 2</div> <div class="carousel-item">Content 3</div></CarouselMoving>
Advanced implementation with all options:
<CarouselMoving fadeEdges scrollSpeed={75} class="custom-carousel" rowProps={{ class: 'items-center gap-4', }} {items.map((item) => <div class="carousel-item">{item}</div>)}</CarouselMoving>
Moving Carousel Component Props API
Prop | Type | Default | Description |
---|---|---|---|
fadeEdges | boolean | true | Enable gradient fade effect on edges |
rowProps | HTMLAttributes<"ul"> | Props for the carousel track element | |
scrollSpeed | number | 100 | Scroll speed in pixels per second |
Best Practices
-
Content Guidelines
- Use consistent item widths
- Maintain readable content while in motion
- Include enough items to fill the container
- Ensure smooth visual flow between items
-
Performance Tips
- Optimize images and SVGs
- Limit the number of complex DOM elements
- Use appropriate scroll speeds for content type
- Consider reduced motion preferences
-
Responsive Design
- Test on various screen sizes
- Adjust scroll speed for viewport width
- Ensure content remains legible on mobile
- Consider pausing on smaller screens
Common Use Cases
Limited Time Launch Sale
Add engaging, infinite-scroll carousels to your website today with our AstroJS starter template. Get started now!
GET 60% OFF!