stream-chat-react
stream-chat-react copied to clipboard
WIP: feat: add new Carousel component
🎯 Goal
Provide own stream-chat-react carousel that would meet the following:
- Enable image swiping on mobile device
- Enable image swiping and snapping on desktop resolutions by mouse-dragging the images
- Simplify the markup compared to that of react-image-gallery which creates multiple layers of
position: relative
elements
Depends on: https://github.com/GetStream/stream-chat-css/pull/147
Todo:
[ ] Tests ....
🛠 Implementation details
Drag-scrolling logic is separated (useDragScrolling
) from the basic carousel navigation (useCarouselController
). The drag-scrolling logic can be disabled and navigation can be performed with arrow buttons on the sides of the carousel aperture.