react-native-snap-carousel icon indicating copy to clipboard operation
react-native-snap-carousel copied to clipboard

Show different UI when item is active

Open acopetkovic opened this issue 2 years ago • 1 comments

Is it possible to show the buttons only on active item and the items that are not active don't have any buttons? carousel

acopetkovic avatar Nov 24 '21 10:11 acopetkovic

@acopetkovic Just use onSnapToItem prop to get active index, and compare if card is active (index === activeIndex) - show buttons, if is not active - hide.

Navipro70 avatar Dec 02 '21 23:12 Navipro70