Closed muresanandrei closed 6 years ago
Hi @muresanandrei,
If you're talking about the two-way control, there already is a dedicated issue regarding it: #202
I still didn't have time to put together a working example, but it should definitely be possible. Can you share what you've tried so far? I'm going to close this issue but we can continue the discussion in the other thread ;-)
Actually not the two-way control is my problem. I am trying to achieve multiple items preview like on that video.
Oh ok. Then you shouldn't have any issue.
There are many examples of multiple items preview in the issues (#51, #161, and others).
Since your items will have a really small width, make sure to decrease the default value of activeSlideOffset
accordingly. You might also want to reduce the value of props swipeThreshold
and callbackOffsetMargin
.
I managed to have the carousel work like on the gif the only problem I have is because I have to set the width of the item same for all items for example 80 width if I have an element with longer text that width will need to be bigger.Can I somehow set auto width for items? I want to have same space between all items but auto width.
This is what I have so far:
No, handling different item widths is not possible. This would require complex developments and would impair carousel's performance.
I'll add it to the roadmap though and will take a deeper look at it in the future to see what can be done about it.
You may get away with an intermediate width and allowing two lines of text with numberOfLines={2}
. You can also try to define a dynamic letterSpacing
based on each item's number of letters (iOS only).
I don't know if it's possible with this plugin. I tried but can't make the carousel work like on this video. https://www.revolut.com/assets/media/ios1.76bac5.mp4.
Is there a way to achieve this with this plugin now?