@knitui/hooks
useMove
Track pointer dragging over an element and report the normalized [0, 1] position. Web implementation — mirrors Mantine's useMove. Wires pointerdown / pointermove / pointerup on window so the drag keeps following the cursor even when it leaves the element, measuring via getBoundingClientRect. The native counterpart lives in use-move.native.ts; this file never imports react-native at runtime, so the web bundle stays free of it.
WebiOSAndroidnative splitshared coretested
Import
import { useMove } from "@knitui/hooks";Signature
export function useMove( onChange: (position: MovePosition) => void, handlers?: UseMoveHandlers, ): UseMoveReturn