Library version
react-native-header-motion v1.x
Description
The docs state that when the header lives inside the HeaderMotion subtree (not rendered by navigation), bridging is unnecessary and the header can be placed inline:
"If your header lives inside the HeaderMotion subtree — meaning it's rendered directly as a child rather than by navigation — bridging is unnecessary. Just place the header component inline."
However, when HeaderMotion.FlatList is nested inside PagerView (as required for the multi-tab pattern), the automatic paddingTop offset that should push list content below the header is not applied. The list scrolls underneath the header.
Steps to Reproduce
Take the official flatlist-pager.tsx example and remove the Stack.Screen / Bridge / NavigationBridge wiring, placing the header inline instead(also set header shown: false in layout):
<HeaderMotion activeScrollId={activeScrollId.sv}>
{/* Inline header — no Bridge/NavigationBridge */}
<CollapsibleHeader
activeTab={activeScrollId.state}
onTabChange={handleTabPress}
/>
<PagerView
ref={pagerRef}
style={{ flex: 1 }}
initialPage={0}
onPageSelected={onPageSelected}
>
<View key="A" style={{ flex: 1 }}>
<HeaderMotion.FlatList
scrollId="A"
data={content}
keyExtractor={(item) => `${item.index}`}
renderItem={({ item }) => <ContentCard {...item} />}
/>
</View>
<View key="B" style={{ flex: 1 }}>
<HeaderMotion.FlatList
scrollId="B"
data={content}
keyExtractor={(item) => `${item.index}`}
renderItem={({ item }) => <ContentCard {...item} />}
/>
</View>
</PagerView>
</HeaderMotion>
CollapsibleHeader is unchanged from the example — it renders HeaderMotion.Header internally.
Expected Behaviour
HeaderMotion.FlatList receives a paddingTop offset equal to the measured header height, so list content starts below the header.
Actual Behaviour
List content starts at y=0 and scrolls behind the absolutely-positioned header. This happens even with flex: 1 on both the PagerView and each page's View wrapper.
What Works
The identical setup works correctly when the header is bridged via Stack.Screen + NavigationBridge (as in the official flatlist-pager.tsx example). The issue is specific to the inline usage pattern when PagerView is the scrollable's parent.
Environment
|
|
react-native-header-motion |
v1.x |
react-native |
0.83.2 |
react-native-reanimated |
3.x |
react-native-pager-view |
latest |
| Platform |
iOS (tested on iPhone 17 Pro Simulator) |

Library version
react-native-header-motionv1.xDescription
The docs state that when the header lives inside the
HeaderMotionsubtree (not rendered by navigation), bridging is unnecessary and the header can be placed inline:However, when
HeaderMotion.FlatListis nested insidePagerView(as required for the multi-tab pattern), the automaticpaddingTopoffset that should push list content below the header is not applied. The list scrolls underneath the header.Steps to Reproduce
Take the official
flatlist-pager.tsxexample and remove theStack.Screen/Bridge/NavigationBridgewiring, placing the header inline instead(also set header shown: false in layout):CollapsibleHeaderis unchanged from the example — it rendersHeaderMotion.Headerinternally.Expected Behaviour
HeaderMotion.FlatListreceives apaddingTopoffset equal to the measured header height, so list content starts below the header.Actual Behaviour
List content starts at
y=0and scrolls behind the absolutely-positioned header. This happens even withflex: 1on both thePagerViewand each page'sViewwrapper.What Works
The identical setup works correctly when the header is bridged via
Stack.Screen+NavigationBridge(as in the officialflatlist-pager.tsxexample). The issue is specific to the inline usage pattern whenPagerViewis the scrollable's parent.Environment
react-native-header-motionreact-nativereact-native-reanimatedreact-native-pager-view