Skip to main content
Version: 0.4.x

Tabbed Header

Tabbed Header Gif

PropertyTypeOptionalDefaultDescription
headerTypeTabbedHeaderNoTabbedHeaderSet header type to TabbedHeader
backgroundColorstringYes'#1ca75d'Header background color
backgroundImageImageSourcePropTypeYesHeader background image source
bouncesbooleanYestrueAllow scroll view bounces (IOS)
contentContainerStylesStyleProp<ViewStyle>YesSet scroll view body styles
foregroundImageImageSourcePropTypeYesSet tabbed header image
headerHeightnumberYesifIphoneX(92, constants.responsiveHeight(13))Set header height
headerelementYesSet custom top header content
headerSize(h: LayoutRectangle) => voidYesHandler that is called when header's size changes
initialPagenumberYes0Set initial page of tab bar
keyboardShouldPersistTapsboolean, "always", "never", "handled"YesSet keyboard persist taps method
logoImageSourcePropTypeYesTop right header image source
logoContainerStyleStyleProp<ViewStyle>YesTop right header image container style
logoResizeModeImageResizeModeYescontainSet top right header image resize mode
logoStyleStyleProp<ImageStyle>YesSet top right header image style
onChangeTab(tab: MountedTabType) => voidYesCallback is called every time when tab is changed
onMomentumScrollBegin(event: NativeSyntheticEvent<NativeScrollEvent>) => voidYesCalled when the momentum scroll starts (scroll which occurs as the ScrollView starts gliding)
onMomentumScrollEnd(event: NativeSyntheticEvent<NativeScrollEvent>) => voidYesCalled when the momentum scroll ends (scroll which occurs as the ScrollView glides to a stop)
onRef(t: null, StickyParallaxHeaderComponent) => voidYesObtain ref for StickyParallaxHeaderComponent
parallaxHeightnumberYesifIphoneX(constants.responsiveHeight(38),constants.responsiveHeight(48))Set parallax header height
refreshControlelementYesA RefreshControl component, used to provide pull-to-refresh functionality
rememberTabScrollPositionboolYesfalseWhen switching between tabs remember current scroll position
scrollEvent (event: NativeSyntheticEvent<NativeScrollEvent>) => voidYesFires at most once per frame during scrolling (Used in custom animations)
scrollRef(t: ScrollView) => void | MutableRefObject<ScrollView>YesGet inner ScrollView ref
snapStartThresholdnumberYesSet start value Threshold of snap
snapStopThresholdnumberYesSet stop value Threshold of snap
snapToEdgebooleanYestrueShould snap header to edge when snap value is exceeded
snapValuebooleanYesparralax header heightSet value where header is closed
tabTextActiveStyleStyleProp<TextStyle>Yes{fontSize: 16, lineHeight: 20, paddingHorizontal: 12, paddingVertical: 8, color: colors.white}Set active tab text styles
tabTextContainerActiveStyleStyleProp<ViewStyle>Yes{backgroundColor: colors.darkMint}Set active tab container style
tabTextStyleStyleProp<TextStyle>Yes{fontSize: 16, lineHeight: 20, paddingHorizontal: 12, paddingVertical: 8, color: colors.white}Set inactive tab style
tabTextContainerStyleStyleProp<ViewStyle>Yes{backgroundColor: colors.transparent, borderRadius: 18}Set inactive tab container style
tabWrapperStyleStyleProp<ViewStyle>Yes{paddingVertical: 12}Set single tab container style
tabs{ content: ReactElement;title?: string;icon?: ReactElement | (isActive: boolean) => ReactElement);YesArray with tabs names, icons and content to render
tabsContainerStyleViewPropTypes.styleYesSet whole tab bar container style
titlestringYesSets header title
titleStyleStyleProp<TextStyle>YesSet style for text in foreground

Check how to customise Tabbed Header example