A headless collapsible header that coordinates scrolling with nested lists, scroll views, and paged content in ReactLynx.
Coordinate a collapsible header, persistent toolbar, and vertical list.
Add pull-to-refresh to the whole coordinator with imperative start and finish controls.
Give each paged feed its own pull-to-refresh lifecycle inside the coordinator.
Share a collapsible header and toolbar across horizontally paged vertical lists.
Synchronize tabs, a pager, and nested lists within one coordinated scroll surface.
Coordinates a collapsible header with nested vertical lists or scroll views.
Typeboolean·Defaultfalse
Enable bounce on supported platforms. Outer refresh always enables it unless popupOptions disables it.
TypeOmit<ScrollCoordinatorProps, ref | children | id | style | className>
Native properties passed explicitly to the coordinator. Managed properties take precedence.
Typeboolean·Defaulttrue
Enable vertical coordinator scrolling.
Typenumber·Default0.01
Offset event granularity as a fraction of the collapse range. Also sets the sticky threshold.
Typeboolean·Defaultfalse
Place the overflowing header above the slot.
TypeReactNode
Collapsible header content.
Typestring
Optional native coordinator ID. Imperative methods use instance-local node refs.
TypeBaseGesture<BaseGestureConfig, GestureChangeEvent>
Native gesture attached to the coordinator.
Type(event: ScrollCoordinatorOffset) => void
Header offset callback on the main thread. Pass a function with the 'main thread' directive.
Type() => void
Called once when the header leaves the sticky threshold.
Type(event: ScrollCoordinatorOffset) => void
Header offset and total collapse range, in px.
Type() => void
Called once when the header reaches the sticky threshold.
Type{enableHalfToFullScreen: boolean, name: string}
Native host popup integration for hosts that support half-to-full-screen expansion.
Typeboolean·Defaultfalse
Use independent refresh elements inside the slot. Each nested refresh must
finish its own refresh through its ref; finishRefresh only affects the outer wrapper.
Typefalse | ScrollCoordinatorRefreshOptions·Defaultfalse
Configure outer native refresh. Enabled outer refresh takes precedence over refreshInSlot.
Providing an options object mounts the refresh wrapper, even while enableRefresh is false.
className and style apply to this wrapper; otherwise they apply to the native coordinator.
No implementation mode is required.
Typeboolean·Defaultfalse
Show the coordinator scrollbar on supported platforms.
Typeboolean·Defaultfalse
Participate as a nested scrolling child of a native Android container.
TypeReactNode
Content below the header, typically a vertical List, ScrollView, or ViewPager of lists.
TypeReactNode
Persistent toolbar. Its height is subtracted from the header's collapse range.
This component exposes runtime states through one or both of the following channels. The table lists only the channels available for each state:
UI variants applied by ScrollCoordinator.
Type() => void
End the outer refresh, including after a failed request. An existing refresh
can still finish after enableRefresh becomes false. Does not reset list offsets.
Type(id: string, animated: boolean, success?: (result: unknown) => void, fail?: (result: unknown) => void) => void
Scroll to an element inside headers, measured relative to this instance's header.
Type(offset: px | rpx, animated: boolean, success?: (result: unknown) => void, fail?: (result: unknown) => void) => void
Set the header offset. The native coordinator clamps it to the scrollable range.
Type(animated: boolean, success?: (result: unknown) => void, fail?: (result: unknown) => void) => void
Collapse the header to its sticky position.
Type(animated: boolean, success?: (result: unknown) => void, fail?: (result: unknown) => void) => void
Expand the header. Does not reset the nested list's own scroll position.
Type() => void
Start the outer refresh through its native node. Requires enableRefresh.
onStartRefresh reports triggeredBy: 'startRefresh'. Does not control slot refresh instances.
Native refresh options with the same callback shapes as FeedList.
Typeboolean
Allow pull gestures and startRefresh() to start the outer refresh.
Toggle this flag to preserve the mounted content and its scroll position.
TypeReactNode
Refresh header content. Give it a nonzero height to define the pull threshold.
Keep its dimensions stable while refreshing to avoid resetting the native header position.
Type(event: {headerSize: number, offset: number}) => void
The native header was released. Reports the latest offset and measured height in px.
Type(event: {headerSize: number, isDragging: boolean, offset: number}) => void
Pull offset and measured header height in px. The height is zero until layout.
Progress is offset / headerSize when headerSize > 0, and may exceed 1.
Type(event: {state: number}) => void
Native state: 0 idle, 1 released past the threshold, 2 refreshing.
Event order is platform-dependent. Use isDragging from the offset event for drag state.
Type(event: {triggeredBy: startRefresh | drag}) => void
Start loading data. Always call ref.finishRefresh() when the request settles.
Returning a Promise does not automatically end the refresh.