79110717

Date: 2024-10-21 15:31:07
Score: 1
Natty:
Report link

I found a decent solution. The downside is that it stops the scroll completely after exiting the carousel. Meaning, it does not take into account any momentum from the mouse velocity; it just stops immediately. However, in my opinion, it's a style choice rather than a downside.

By using style={{ overflowX: "auto", scrollSnapType: 'none' }} in the carousel div and style={{ scrollSnapAlign: 'none' }} for each carousel item, I was able to 'solve' the multiple carousel bug.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: C W