React Native ScrollView with pagination + showing part of the next page

Viewed 7350

I'm trying to create an interface where cards are presented one at a time to the user. The user can scroll left and right in a paged fashion. I also want to view a small amount of the card to the left and the right of the current card, as a hint that there is more to see. A very rough example of this would be:

enter image description here

Current code is:

<ScrollView
   style={{width: Dimensions.get('window').width, height: 300}}
   horizontal={true}
   pagingEnabled={true}
   showsHorizontalScrollIndicator={false}
   alwaysBounceHorizontal={false}
   automaticallyAdjustContentInsets={false}>
    <View style={{width: 200, height: 300}}></View>
    <View style={{width: 200, height: 300}}></View>
    <View style={{width: 200, height: 300}}></View>
 </ScrollView>
1 Answers
Related