Skip to main content
Version: 1.x

HeaderMotion.ScrollView

A pre-wired Animated.ScrollView that participates in Header Motion's scroll tracking and header offsetting.

It's a drop-in replacement for Animated.ScrollView with additional Header Motion capabilities.

Usage

<HeaderMotion.ScrollView>{/* scrollable content */}</HeaderMotion.ScrollView>

Props

Accepts all Animated.ScrollView props, plus:

PropTypeDefaultDescription
scrollIdstringUnique identifier for multi-scroll setups where one header is shared across scrollables.
headerOffsetStrategy'padding' | 'margin' | 'top' | 'translate' | 'none''padding'Controls how content is pushed below the measured header.
ensureScrollableContentMinHeightbooleanfalseExperimental. Adds minimum content height so short content can still collapse the header.
animatedRefAnimatedRefLets you reuse your own animated ref (from useAnimatedRef()) for programmatic scroll control.

Standard scroll callbacks (onScroll, onScrollBeginDrag, onScrollEndDrag, onMomentumScrollBegin, onMomentumScrollEnd) work as expected alongside the internal handlers.

Refresh control props (refreshing, onRefresh, refreshControl, progressViewOffset) are also supported.