Gathering detailed insights and metrics for react-native-tab-view-collapsible-header-expand
Gathering detailed insights and metrics for react-native-tab-view-collapsible-header-expand
Gathering detailed insights and metrics for react-native-tab-view-collapsible-header-expand
Gathering detailed insights and metrics for react-native-tab-view-collapsible-header-expand
Add collapsible headers for react-native-tab-view
npm install react-native-tab-view-collapsible-header-expand
Typescript
Module System
Node Version
NPM Version
TypeScript (93.31%)
JavaScript (6.69%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
27 Stars
10 Commits
7 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Oct 14, 2024
Latest Version
2.0.2
Package Id
react-native-tab-view-collapsible-header-expand@2.0.2
Unpacked Size
7.91 kB
Size
2.76 kB
File Count
6
NPM Version
8.4.1
Node Version
17.5.0
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
Extend react-native-tab-view to have shared collapsible headers
Please check the base library before using this library.
1import * as React from 'react'; 2import { View, StyleSheet, Dimensions, ScrollView } from 'react-native'; 3import { SceneMap } from 'react-native-tab-view'; 4import { HPageViewHoc } from 'react-native-head-tab-view' 5import { CollapsibleHeaderTabView } from 'react-native-tab-view-collapsible-header' 6const HScrollView = HPageViewHoc(ScrollView) 7 8const FirstRoute = () => ( 9 <HScrollView index={0}> 10 <View style={[styles.scene, { backgroundColor: '#ff4081' }]} /> 11 </HScrollView> 12); 13 14const SecondRoute = () => ( 15 <HScrollView index={1}> 16 <View style={[styles.scene, { backgroundColor: '#673ab7' }]} /> 17 </HScrollView> 18); 19 20const initialLayout = { width: Dimensions.get('window').width }; 21 22export default function TabViewExample() { 23 const [index, setIndex] = React.useState(0); 24 const [routes] = React.useState([ 25 { key: 'first', title: 'First' }, 26 { key: 'second', title: 'Second' }, 27 ]); 28 29 const renderScene = SceneMap({ 30 first: FirstRoute, 31 second: SecondRoute, 32 }); 33 34 return ( 35 <CollapsibleHeaderTabView 36 makeHeaderHeight={() => 200} 37 renderScrollHeader={() => <View style={{ height: 200, backgroundColor: 'red' }} />} 38 navigationState={{ index, routes }} 39 renderScene={renderScene} 40 onIndexChange={setIndex} 41 initialLayout={initialLayout} 42 /> 43 ); 44} 45 46const styles = StyleSheet.create({ 47 scene: { 48 flex: 1, 49 }, 50});
More examples:Example
1 2yarn add react-native-head-tab-view react-native-gesture-handler
1yarn add react-native-tab-view-collapsible-header
react-native-head-tab-view | react-native-scrollable-tab-view | react-native-tab-view-collapsible-header |
---|---|---|
v1 ~ v2 | - | - |
v3 | v0 | v0 |
v4-rc.1 | v1 | v1 |
v4-rc.2 | v2 | v2 |
1import { CollapsibleHeaderTabView } from 'react-native-scrollable-tab-view-collapsible-header'
1import { CollapsibleHeaderTabView } from 'react-native-tab-view-collapsible-header'
CollapsibleHeaderTabView
extends the props for the tabs component by adding the CollapsibleHeaderProps
renderScrollHeader
(React.ComponentTyperender the collapsible header
1renderScrollHeader={()=><View style={{height:180,backgroundColor:'red'}}/>}
headerHeight
(optional)The height of collapsible header.
tabbarHeight
(optional)The height of collapsible tabbar
frozeTop
The height at which the top area of the Tabview is frozen
overflowHeight
Sets the upward offset distance of the TabView and TabBar
makeScrollTrans
(scrollValue: Animated.ShareValueGets the animation value of the shared collapsible header.
1<CollapsibleHeaderTabView 2 makeScrollTrans={(scrollValue) => { 3 this.setState({ scrollValue }) 4 }} 5/>
onStartRefresh
(() => void)If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality.
Make sure to also set the isRefreshing prop correctly.
isRefreshing
(boolean)Whether the TabView is refreshing
renderRefreshControl
(() => React.ReactElement)A custom RefreshControl
refreshHeight
(number)If this height is reached, a refresh event will be triggered (onStartRefresh)
it defaults to 80
scrollEnabled
(boolean)Whether to allow the scene to slide vertically
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/10 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
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