Skip to main content
Version: 1.x

HeaderMotion.Header.Dynamic

Marks the part of the header whose layout defines the collapse distance (progressThreshold).

Wrap the section that visually disappears during collapse with this component.

Usage

<HeaderMotion.Header style={headerStyle}>
<HeaderMotion.Header.Dynamic style={dynamicStyle}>
{/* This section's height defines progressThreshold */}
</HeaderMotion.Header.Dynamic>
<View>{/* Sticky section */}</View>
</HeaderMotion.Header>

Props

Accepts all Animated.View props, plus:

PropTypeDefaultDescription
asChildbooleanfalseInjects the dynamic measurement into a single child element instead of rendering the default Animated.View.