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

Styling with flex... Is it not possible to omit the sliderWidth and itemWidth and make it infer it from flex styles? #843

Open batubb opened 3 years ago

batubb commented 3 years ago

I want to put a carousel in between two icons on my page page. Think of it as:

icon1 horizontalCarousel icon2

Do I have to specify the sliderWidth and itemWidth? Can I not give flex properties?

Is this a bug report, a feature request, or a question?

Question

Have you followed the required steps before opening a bug report?

(Check the step you've followed - put an x character between the square brackets ([]).)

Have you made sure that it wasn't a React Native bug?

(Write your answer here.) Yes

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

(Write your answer here and specify the iOS/Android versions on which you've been able to reproduce the issue.) Yes

Is the bug reproductible in a production environment (not a debug one)?

(Write your answer here.) Yes

Environment

(Write your answer here.)

Expected Behavior

(Write what you thought would happen.)

Actual Behavior

(Write what happened. Add screencasts/screenshots!)

Reproducible Demo

(Paste the link to a Snack example in which the issue can be reproduced. Please follow the guidelines for providing a Minimal, Complete, and Verifiable example.)

Steps to Reproduce

(Write your steps so that anyone can reproduce the issue in the Snack demo you provided.)

reberthkss commented 3 years ago

+1

dohooo commented 3 years ago

@batubb Sorry, please allow me to advertise for my open source library! ~ I think this library react-native-reanimated-carousel will solve your problem. It is a high performance and very simple component, complete with React-Native reanimated 2