0

I've used deckSwiper of native-base in react native project. I want the users to be able to zoom the image in it as well. I didn't find anything to do that. How can I zoom the image of deck swiper in native base?

Code:

<DeckSwiper
    ref={(c) => this._deckSwiper = c}
    dataSource={cards}
    renderEmpty={() =>
        <View style={{alignSelf: "center"}}>
            <Text>Over</Text>
        </View>}
    renderItem={item =>
        <Card style={{elevation: 3}}>
            <CardItem cardBody>
                <Image style={{height: 300, flex: 1}} source={item.image}/>
            </CardItem>
        </Card>
    }
/>
Amrita Stha
  • 2,973
  • 3
  • 25
  • 46

2 Answers2

1

No, DeckSwiper doesn't provide zoom functionality. However you can use 3rd party library for that feature instead of using <Image>

Here are few 3rd party libraries which i have used in my applications.

1) react-native-image-zoom
2) react-native-image-viewer

But still, before using any of this library, you should check your requirement and check which one is best suited for you.

Ravi
  • 34,851
  • 21
  • 122
  • 183
0

Its not about Deck Swiper supporting Image zoom feature

If React Native Image provides zoom feature by default, then NativeBase will obviously support this

Supriya Kalghatgi
  • 1,155
  • 9
  • 10