%% generate tags start %% #software-engineering %% generate tags end %% #software-engineering/react-native ![[sticky header.mp4]] ```ts <ScrollView // make tab bar stick to top when scrolling down stickyHeaderIndices={[2]} > <BannerComponent /> <--- 0 <ProfileIntro /> <--- 1 {/* only show info when user is not blacklisted */} {/* split into 2 elements to make only tab bar stick to top */} {!hasBeenBlackListedByQuery.data && <ProfileTabView.Control />} <--- 2 {!hasBeenBlackListedByQuery.data && <ProfileTabView.TabContent />} </ScrollView> ``` > [!info] see more > [ScrollView · React Native](https://reactnative.dev/docs/scrollview.html#stickyheaderindices)