![]() This pager is still experimental as the underlying library is still in alpha. useNativeDriver - whether to use native animations.GestureHandler - the gesture handler module to use.PropsĬross-platform pager component based on react-native-gesture-handler. Īndroid only pager based on ViewPagerAndroid (default on Android). There are some caveats when using this pager on Android, such as poor support for intial index other than 0 and weird animation curves. onSwipeEnd - optional callback when a swipe gesture endsĬross-platform pager based on ScrollView (default on iOS).onSwipeStart - optional callback when a swipe gesture starts.swipeVelocityThreshold - minimum swipe velocity to trigger page switch.swipeDistanceThreshold - minimum swipe distance to trigger page switch.swipeEnabled - whether to enable swipe gestures Open a Terminal in the project root and run: yarn add react-native-collapsible-tab-view Now add react-native-tab-view and all it's peer dependencies: yarn add react-native-tab-view For the peer dependencies, if using expo: expo install react-native-gesture-handler react-native-reanimated If not using expo, follow these instructions.animationEnabled - whether to enable page change animation.configureTransition - optional callback which returns a configuration for the transition.pressOpacity - opacity for pressed tab (iOS and Android Ĭross-platform pager based on the PanResponder.pressColor - color for material ripple (Android >= 5.0 only).onTabPress - optional callback invoked on tab press which receives the scene for the pressed tab, useful for things like scroll to top.renderBadge - optional callback which receives the current scene and returns a React Element to be used as a badge.renderIndicator - optional callback which receives the current scene and returns a React Element to be used as a tab indicator.renderLabel - optional callback which receives the current scene and returns a React Element to be used as a label.renderIcon - optional callback which receives the current scene and returns a React Element to be used as a icon. ![]()
0 Comments
Leave a Reply. |