search-games
  • menu-rewards
  • menu-fortune-wheel
  • menu-live-chat
  • menu-blog

Carousel Comparison Test

Current Custom Implementation

Performance: Optimized with RAF throttling, native scroll

Pros:
  • Full control over behavior
  • Optimized for our specific use case
  • No external dependencies
  • ~60fps with RAF throttling
Cons:
  • Custom maintenance required
  • Had performance issues initially
  • Required significant optimization work

Recommended NPM Libraries

1. Swiper (swiper)

Downloads: ~3M/week | Size: ~150KB

Pros:
  • Most popular carousel library
  • Hardware accelerated
  • Touch/mouse drag support
  • Virtual slides for performance
  • Excellent documentation
  • React integration available
Cons:
  • Larger bundle size (~150KB)
  • May be overkill for simple use case
  • Requires configuration
Installation:npm install swiper

2. Embla Carousel (embla-carousel-react)

Downloads: ~500K/week | Size: ~30KB

Pros:
  • Lightweight (~30KB)
  • Excellent performance
  • Framework agnostic
  • Modern API
  • TypeScript support
Cons:
  • Less features than Swiper
  • Smaller community
Installation:npm install embla-carousel-react

3. React Slick (react-slick)

Downloads: ~2M/week | Size: ~80KB

Pros:
  • Popular and mature
  • Easy to use
  • Many configuration options
Cons:
  • Based on jQuery Slick (older)
  • Performance issues with many slides
  • Not actively maintained
  • Not recommended for new projects

4. Keen Slider (keen-slider)

Downloads: ~200K/week | Size: ~20KB

Pros:
  • Very lightweight (~20KB)
  • Great performance
  • Touch optimized
  • No dependencies
Cons:
  • Smaller ecosystem
  • Less features
Installation:npm install keen-slider

Recommendation

Keep Current Implementation ✅

Reasons:

  • Already Optimized: After RAF throttling and optimizations, performance is excellent
  • No Bundle Size: Adding Swiper would add ~150KB to bundle
  • Tailored Solution: Custom implementation fits exact requirements
  • Working Well: Current solution performs at 60fps with all features needed
  • No Migration Cost: Would need to rewrite all 3 carousel components

When to Consider NPM Library:

  • Need advanced features (3D effects, parallax, etc.)
  • Building new carousel from scratch
  • Team lacks time for custom maintenance
  • Need features like autoplay, pagination, thumbnails

If You Still Want to Try Swiper:

I can create a working implementation, but consider:

  • Bundle size increase: ~150KB
  • Migration effort: Need to rewrite 3 carousel components
  • Learning curve: Team needs to learn Swiper API
  • Current solution already works well

Performance Comparison

SolutionBundle SizePerformanceMaintenanceFeatures
Current Custom~5KB60fps ✅CustomBasic
Swiper~150KB60fps ✅CommunityAdvanced
Embla~30KB60fps ✅CommunityModerate
Keen Slider~20KB60fps ✅CommunityBasic

Conclusion

Your current custom carousel implementation is already excellent after optimization.

The performance issues you experienced were due to:

  • Excessive re-renders from GameCard states
  • Unthrottled mouse move handlers
  • Hover overlay interference

All of these have been fixed. The carousel now performs as well as any npm library while being much lighter and tailored to your exact needs.

Recommendation: Keep the current optimized implementation.

licence-certrg-18
footer-column-link-1-how-to
footer-column-link-3-responsible-gaming
footer-column-link-3-aml
footer-column-link-2-affiliates
footer-column-link-2-popular
footer-column-link-2-casino
footer-column-link-2-live-casino
footer-column-link-2-all-games
footer-column-link-3-legal
footer-column-link-3-privacy-terms
footer-column-link-3-promo-terms
footer-column-link-3-cookies-policy
licence-certrg-18

Pikapotti is an online betting operator offering fun and safe gaming to customers worldwide. On jackpotti, players can enjoy casino games such as blackjack and roulette in table games, or choose from any of the many (4000+) slot games available from top game providers like Microgaming, Playtech, Kalamba, and QuickSpin, to name a few. Additionally, our customers can also experience Live Casino, where table games are available to play with live dealers.

Pikapotti is owned and operated by Playsmart Ent BV, registered in Curacao, with a registered office address at Kaya Seru Cueba 16, Willemstad, Curaçao, and a company registration number of 155275. Access to JACKPOTTI is restricted to players aged 18 and over. We are extremely diligent with our player safety procedures to protect our customers and maintain a safe and enjoyable environment. For this reason, PlaySmart ENT reserves the right to prohibit access to any of the brands in the Group to anyone found in breach of our Terms of Service.

+18. Hyväksyt Pikapotin käyttöehdot
Koti
footer-menu-mobile-search
mobile-menu-fortune-wheel
footer-menu-mobile-menu