Installations
npm install react-native-tab-view-viewpager-adapter
Score
35.4
Supply Chain
51.7
Quality
67.8
Maintenance
50
Vulnerability
95.3
License
Developer
software-mansion
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
Yes
Node Version
12.18.0
NPM Version
6.14.4
Statistics
78 Stars
28 Commits
13 Forks
5 Watching
37 Branches
6 Contributors
Updated on 05 Apr 2024
Bundle Size
3.31 kB
Minified
1.33 kB
Minified + Gzipped
Languages
TypeScript (30.79%)
Java (20.79%)
Objective-C (16.59%)
Starlark (12.82%)
JavaScript (12.25%)
Ruby (6.77%)
Total Downloads
Cumulative downloads
Total Downloads
172,421
Last day
-37.5%
10
Compared to previous day
Last week
-23.3%
66
Compared to previous week
Last month
26.5%
325
Compared to previous month
Last year
-88.9%
4,724
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
6
Dev Dependencies
25
React Native Tab View ViewPager Adapter
This library is an adapter that allows for utilizing React Native ViewPager in React Native Tab View. With this package, you can replace existing pager responsible for scrolling experience with a purely native one.
Motivation
React Native ViewPager under the hood uses native UIViewPagerController
on iOS and ViewPager
on Android. Although it's not that customizable as React Native Tab View's Pager built with Reanimated and Gesture Handler, it can deliver a bit better native feeling and expose some options not available in TabView by default.
Usage
1import React, { useState } from 'react'; 2import { TabView, SceneMap } from 'react-native-tab-view'; 3import ViewPagerAdapter from 'react-native-tab-view-viewpager-adapter'; 4 5<TabView 6 renderScene={() => {/* render */}} 7 renderTabBar={() => null} 8 renderPager={props => ( 9 <ViewPagerAdapter {...props} transition="curl" showPageIndicator /> 10 )} 11/> 12
Props
ViewPagerAdapter
accepts a set of props needed for adapting to Internal API of React Native Tab View and are not described here neither supposed to be used.
However, there are few more additional props:
Prop | Description | Platform |
---|---|---|
style: Style | Style to apply to ViewPager | both |
pageMargin: number | Blank space to be shown between pages | both |
orientation: Orientation | Set horizontal or vertical scrolling orientation (it does not work dynamically) | both |
transition: string | Use scroll or curl to change transition style (it does not work dynamically) | iOS |
showPageIndicator: boolean | Shows the dots indicator at the bottom of the view | iOS |
overdrag: boolean | Allows for overscrolling after reaching the end or very beginning of pages | iOS |
overScrollMode: OverScollMode | Used to override default value of overScroll mode. Can be auto, always or never. Defaults to auto | Android |
You can find more resources in React Native ViewPager documentation
Usage with React Navigation < 5
1const SwipeStack = createMaterialTopTabNavigator( 2 { 3 A: { 4 name: 'A screen', 5 screen: ScreenA, 6 }, 7 B: { 8 name: 'B screen', 9 screen: ScreenB, 10 }, 11 }, 12 { 13 pagerComponent: ViewPagerAdapter 14 } 15);
Usage with React Navigation 5
1const MaterialTopTabs = createMaterialTopTabNavigator<MaterialTopTabParams>(); 2 3export default function MaterialTopTabsScreen() { 4 return ( 5 <MaterialTopTabs.Navigator 6 pager={props => <ViewPagerAdapter {...props} />} 7 > 8 <MaterialTopTabs.Screen 9 name="A" 10 component={ScreenA} 11 options={{ title: 'Chat' }} 12 /> 13 <MaterialTopTabs.Screen 14 name="contacts" 15 component={ScreenB} 16 options={{ title: 'Contacts' }} 17 /> 18 </MaterialTopTabs.Navigator> 19 ); 20}
Installation
yarn add react-native-tab-view-viewpager-adapter
Also, you need to set up React Native View Pager
Note
renderPager
prop in React Native Tab View is available only from version 2.11.0
Example
We created a React Native example which can be run with following commands:
1cd example 2react-native run-android
or
1cd example 2cd ios 3pod install 4cd .. 5react-native run-ios
No vulnerabilities found.
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
binaries present in source code
Details
- Warn: binary detected: example/android/gradle/wrapper/gradle-wrapper.jar:1
Reason
Found 4/25 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 7 are checked with a SAST tool
Reason
87 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-6chw-6frg-f759
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44
- Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3
- Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-4cpg-3vgw-4877
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-rxrc-rgv4-jpvx
- Warn: Project is vulnerable to: GHSA-7f53-fmmv-mfjv
- Warn: Project is vulnerable to: GHSA-2j79-8pqc-r7x6
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-gff7-g5r8-mg8m
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-662x-fhqg-9p8v
- Warn: Project is vulnerable to: GHSA-394c-5j6w-4xmx
- Warn: Project is vulnerable to: GHSA-78cj-fxph-m83p
- Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3
- Warn: Project is vulnerable to: GHSA-9m6j-fcg5-2442
- Warn: Project is vulnerable to: GHSA-hh27-ffr2-f2jc
- Warn: Project is vulnerable to: GHSA-rqff-837h-mm52
- Warn: Project is vulnerable to: GHSA-8v38-pw62-9cw2
- Warn: Project is vulnerable to: GHSA-hgjh-723h-mx2j
- Warn: Project is vulnerable to: GHSA-jf5r-8hm2-f872
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693
- Warn: Project is vulnerable to: GHSA-h6q6-9hqw-rwfv
- Warn: Project is vulnerable to: GHSA-5fg8-2547-mr8q
- Warn: Project is vulnerable to: GHSA-crh6-fp67-6883
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
- Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm
- Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-px4h-xg32-q955
- Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4
- Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653
- Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj
- Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67
- Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w
- Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2
- Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7
Score
1.7
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to react-native-tab-view-viewpager-adapter
react-native-tab-view
Tab view component for React Native
react-native-pager-view
React Native wrapper for Android and iOS ViewPager
@react-navigation/material-top-tabs
Integration for the animated tab view component from react-native-tab-view
react-native-tab-view-next
Tab view component for React Native