Skip to main content
Version: 1.x

useHeaderMotionBridge

Returns the full internal HeaderMotion bridge value. This includes everything from useMotionProgress() plus measurement callbacks and scroll synchronization internals.

caution

Most app code should use useMotionProgress() instead. Only use this hook when you need direct access to the internal bridge value for advanced context-bridging scenarios.

Signature

function useHeaderMotionBridge(): HeaderMotionBridgeValue;

Returns

PropertyTypeDescription
progressSharedValue<number>The collapse progress (0 to 1).
progressThresholdSharedValue<number>Collapse distance in pixels.
measureTotalHeight(e: LayoutChangeEvent) => voidCallback wired to HeaderMotion.Header.
measureDynamic(e: LayoutChangeEvent) => voidCallback wired to HeaderMotion.Header.Dynamic.
headerPanMomentumOffsetSharedValue<number | null>Pan momentum tracking value.
scrollValuesSharedValue<ScrollValues>Internal scroll state for all registered scrollables.
activeScrollIdSharedValue<string> | undefinedCurrently active scroll ID.
scrollToRefRefObject<ScrollTo | null>Imperative scroll function ref.
originalHeaderHeightnumberMeasured total header height.

Must be called within a HeaderMotion or HeaderMotion.NavigationBridge subtree.