Gathering detailed insights and metrics for react-native-scrollable-tab-view
Gathering detailed insights and metrics for react-native-scrollable-tab-view
Gathering detailed insights and metrics for react-native-scrollable-tab-view
Gathering detailed insights and metrics for react-native-scrollable-tab-view
react-native-tab-view
Tab view component for React Native
@types/react-native-scrollable-tab-view
TypeScript definitions for react-native-scrollable-tab-view
react-native-scrollable-tab-view-collapsible-header-v0
Extend react-native-scrollable-tab-view to have shared collapsible headers
react-native-collapsible-tab-view
Collapsible tab view component for React Native
Tabbed navigation that you can swipe between, each tab can have its own ScrollView and maintain its own scroll position between swipes. Pleasantly animated. Customizable tab bar
npm install react-native-scrollable-tab-view
Typescript
Module System
Node Version
NPM Version
JavaScript (82.99%)
Objective-C (9.95%)
Starlark (3.89%)
Java (3.17%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
6,943 Stars
382 Commits
2,267 Forks
137 Watchers
2 Branches
74 Contributors
Updated on Jul 06, 2025
Latest Version
1.0.0
Package Id
react-native-scrollable-tab-view@1.0.0
Size
27.46 kB
NPM Version
6.4.1
Node Version
11.3.0
Published on
Oct 28, 2019
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
2
This is probably my favorite navigation pattern on Android, I wish it were more common on iOS! This is a very simple JavaScript-only implementation of it for React Native. For more information about how the animations behind this work, check out the Rebound section of the React Native Animation Guide
npm install react-native-scrollable-tab-view --save
var ScrollableTabView = require('react-native-scrollable-tab-view');
1var ScrollableTabView = require('react-native-scrollable-tab-view'); 2 3var App = React.createClass({ 4 render() { 5 return ( 6 <ScrollableTabView> 7 <ReactPage tabLabel="React" /> 8 <FlowPage tabLabel="Flow" /> 9 <JestPage tabLabel="Jest" /> 10 </ScrollableTabView> 11 ); 12 } 13});
Suppose we had a custom tab bar called CustomTabBar
, we would inject
it into our ScrollableTabView
like this:
1var ScrollableTabView = require('react-native-scrollable-tab-view'); 2var CustomTabBar = require('./CustomTabBar'); 3 4var App = React.createClass({ 5 render() { 6 return ( 7 <ScrollableTabView renderTabBar={() => <CustomTabBar someProp={'here'} />}> 8 <ReactPage tabLabel="React" /> 9 <FlowPage tabLabel="Flow" /> 10 <JestPage tabLabel="Jest" /> 11 </ScrollableTabView> 12 ); 13 } 14});
To start you can just copy DefaultTabBar.
renderTabBar
(Function:ReactComponent) - accept 1 argument props
and should return a component to use as
the tab bar. The component has goToPage
, tabs
, activeTab
and
ref
added to the props, and should implement setAnimationValue
to
be able to animate itself along with the tab content. You can manually pass the props
to the TabBar component.tabBarPosition
(String) Defaults to "top"
.
"bottom"
to position the tab bar below content."overlayTop"
or "overlayBottom"
for a semitransparent tab bar that overlays content. Custom tab bars must consume a style prop on their outer element to support this feature: style={this.props.style}
.onChangeTab
(Function) - function to call when tab changes, should accept 1 argument which is an Object containing two keys: i
: the index of the tab that is selected, ref
: the ref of the tab that is selectedonScroll
(Function) - function to call when the pages are sliding, should accept 1 argument which is an Float number representing the page position in the slide frame.locked
(Bool) - disables horizontal dragging to scroll between tabs, default is false.initialPage
(Integer) - the index of the initially selected tab, defaults to 0 === first tab.page
(Integer) - set selected tab(can be buggy see #126children
(ReactComponents) - each top-level child component should have a tabLabel
prop that can be used by the tab bar component to render out the labels. The default tab bar expects it to be a string, but you can use anything you want if you make a custom tab bar.tabBarUnderlineStyle
(View.propTypes.style) - style of the default tab bar's underline.tabBarBackgroundColor
(String) - color of the default tab bar's background, defaults to white
tabBarActiveTextColor
(String) - color of the default tab bar's text when active, defaults to navy
tabBarInactiveTextColor
(String) - color of the default tab bar's text when inactive, defaults to black
tabBarTextStyle
(Object) - Additional styles to the tab bar's text. Example: {fontFamily: 'Roboto', fontSize: 15}
style
(View.propTypes.style)contentProps
(Object) - props that are applied to root ScrollView
/ViewPagerAndroid
. Note that overriding defaults set by the library may break functionality; see the source for details.scrollWithoutAnimation
(Bool) - on tab press change tab without animation.prerenderingSiblingsNumber
(Integer) - pre-render nearby # sibling, Infinity
=== render all the siblings, default to 0 === render current page.Issues are welcome. Please add a screenshot of bug and code snippet. Quickest way to solve issue is to reproduce it on one of the examples.
Pull requests are welcome. If you want to change API or making something big better to create issue and discuss it first. Before submiting PR please run eslint .
Also all eslint fixes are welcome.
Please attach video or gif to PR's and issues it is super helpful.
MIT Licensed
No vulnerabilities found.
Reason
binaries present in source code
Details
Reason
Found 18/23 approved changesets -- score normalized to 7
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
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
99 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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 More