Skip to content

How can I create a carousel with multiple item at once like the image attached? #543

Answered by dosubot bot
djokhar05 asked this question in Q&A
Discussion options

You must be logged in to vote

🤖

Hey there @djokhar05! Great to see you back again. Let's dive into your carousel quest! 🎠

Sure, you can create a carousel that displays multiple items at once using the react-native-reanimated-carousel library. This can be achieved by adjusting the viewCount and width properties. The viewCount property determines how many items are visible at once, and the width property determines the width of each item.

Here's an example of how you can modify your code:

function Index() {
  // ... other code ...

  const viewCount = 3; // change this to 3
  const itemWidth = "33.33%"; // each item takes up a third of the carousel

  return (
    <View style={{ flex: 1 }}>
      <Carousel
        style={{

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@djokhar05
Comment options

Answer selected by djokhar05
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant