meliorence / react-native-snap-carousel

Swiper/carousel component for React Native featuring previews, multiple layouts, parallax images, performant handling of huge numbers of items, and more. Compatible with Android & iOS.
BSD 3-Clause "New" or "Revised" License
10.37k stars 2.29k forks source link

Vertical mode for stacks? #888

Open ghost opened 3 years ago

ghost commented 3 years ago

anyone who has implemented stacks in vertical mode? if yes please let me know here

syedtehrimabbas commented 2 years ago

Yes, I have implemented it.

<Carousel layout={'default'} ref={carouselRef} data={allStories} sliderWidth={width} itemHeight={height} sliderHeight={height - 100} itemWidth={width + horizontalMargin} removeClippedSubviews={true} enableMomentum={true} firstItem={currentStoryIndex} useScrollView={true} vertical={true} renderItem={_renderStories} decelerationRate={0.9} onSnapToItem={(index) => moveToNext(index)} onBeforeSnapToItem={(index) => { setCurrentStoryIndex(index); setIsMutedVideo(false); // progress.setValue(0); }} />

NoahSimajji commented 1 year ago

Thank @syedtehrimabbas I tried to do vertical somehow got into some error message, your codes is a good reference to let me check what is missing, thanks once again.