Skip to main content
Version: 0.4.x

Avatar Header

Avatar Header Gif

PropertyTypeOptionalDefaultDescription
headerTypeAvatarHeaderYesTabbedHeaderSet header type to TabbedHeader
backgroundColorstringYes'#1ca75d'Header background color
backgroundImageImageSourcePropTypeYesHeader background image source
bouncesbooleanYestrueAllow scroll view bounces (IOS)
childrenReactNodeYesRender content inside ScrollView
contentContainerStylesStyleProp<ViewStyle>YesSet scroll view body styles
hasBorderRadiusbooleanYestrueAdds radius to header's right bottom border
headerHeightnumberYesifIphoneX(92, constants.responsiveHeight(13))Set header height
headerSize(h: LayoutRectangle) => voidYesHandler that is called when header's size changes
imageImageSourcePropTypeYesSets header image
leftTopIcon() => ReactElement | ImageSourcePropTypeYesSet icon for left top button
leftTopIconOnPress() => voidYesDefine action on left top button press
rightTopIcon() => ReactElement | ImageSourcePropTypeYesSet icon for right top button
rightTopIconOnPress() => voidYesDefine action on right top button press
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)
parallaxHeightnumberYesifIphoneX(constants.responsiveHeight(38),constants.responsiveHeight(48))Set parallax header height
refreshControlelementYesA RefreshControl component, used to provide pull-to-refresh functionality
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
subtitlestringYesSets header subtitle
titlestringYesSets header title