Skip to main content
Version: Next

Tabbed Header List

Tabbed Header List Gif

Example usage

Full source code can be found in example repo.

const TabbedHeaderListExample: React.FC = () => {
return (
<>
<TabbedHeaderList
contentContainerStyle={{ backgroundColor: colors.coralPink }}
containerStyle={screenStyles.stretchContainer}
backgroundColor={colors.coralPink}
title="Food delivery app"
titleStyle={screenStyles.text}
foregroundImage={{ uri: 'https://foodish-api.herokuapp.com/images/samosa/samosa9.jpg' }}
parallaxHeight={100}
tabs={TABBED_SECTIONS.map(({ title }) => ({ title }))}
tabTextStyle={screenStyles.text}
sections={TABBED_SECTIONS}
tabTextContainerActiveStyle={{ backgroundColor: colors.activeOrange }}
keyExtractor={(_, i) => `${i}`}
renderItem={({ item }) => <TabbedSectionItem {...item} />}
renderSectionHeader={({ section }) => (
<TabbedSectionHeader title={section.title} />
)}
getItemLayout={(_, index) => ({
length: TABBED_SECTION_ITEM_HEIGHT,
offset: TABBED_SECTION_ITEM_HEIGHT * index,
index,
})}
updateCellsBatchingPeriod={100}
showsVerticalScrollIndicator={false}
/>
<StatusBar barStyle="light-content" backgroundColor={colors.coralPink} translucent />
</>
);
};

Props

Inherits SectionListProps

PropTypeDefault value
backgroundColorcolor - ColorValue-
backgroundImageimage source - ImageSourcePropType-
containerStylestyle - StyleProp<ViewStyle>-
enableSafeAreaTopInsetbooleantrue
foregroundImageimage source - ImageSourcePropType-
hasBorderRadiusboolean-
headerHeightnumber100
logoimage source - ImageSourcePropType-
logoContainerStylestyle - StyleProp<ViewStyle>-
logoResizeModeimage resize mode - ImageResizeMode-
logoStylestyle - StyleProp<ImageStyle>-
onHeaderLayoutfunction - (e: LayoutChangeEvent) => void-
onMomentumScrollBeginworklet function - (e: NativeScrollEvent) => void-
onMomentumScrollEndworklet function - (e: NativeScrollEvent) => void-
onScrollworklet function - (e: NativeScrollEvent) => void-
onScrollBeginDragworklet function - (e: NativeScrollEvent) => void-
onScrollEndDragworklet function - (e: NativeScrollEvent) => void-
onTabsLayoutfunction - (e: LayoutChangeEvent) => void-
onTopReachedfunction - () => void-
parallaxHeightnumber53% of screen's height
renderHeaderBarrender function-
snapStartThresholdnumber-
snapStopThresholdnumber-
snapToEdgebooleantrue
stickyTabsbooleantrue
tabTextActiveStylestyle - StyleProp<TextStyle>-
tabTextContainerStylestyle - StyleProp<ViewStyle>-
tabTextContainerActiveStylestyle - StyleProp<ViewStyle>-
tabTextStylestyle - StyleProp<TextStyle>-
tabUnderlineColorcolor - ColorValue-
tabWrapperStylestyle - StyleProp<ViewStyle>-
tabsTabs array - Tab[]-
tabsContainerBackgroundColorcolor - ColorValue-
tabsContainerHorizontalPaddingnumber20
tabsContainerStylestyle - StyleProp<ViewStyle>-
titlestring-
titleStylestyle = StyleProp<TextStyle>-
titleTestIDstring-

Tab

PropTypeDefault value
titlestring-
iconReact Element or render function with isActive param-