@knitui/hooks
useRadialMove
Track pointer dragging over a circular control and report the angle (0–359) under the pointer. Web implementation — mirrors Mantine's useRadialMove. Wires pointerdown / pointermove / pointerup on window so the drag keeps following the cursor even when it leaves the ring, measuring the centre via getBoundingClientRect. The native counterpart lives in use-radial-move.native.ts; this file never imports react-native at runtime, so the web bundle stays free of it. onChange returns the value actually applied (after the consumer snaps / restricts it), which is forwarded to onChangeEnd when the gesture ends.
WebiOSAndroidnative splitshared core
Import
import { useRadialMove } from "@knitui/hooks";Signature
export function useRadialMove( onChange: (angle: number) => number, options?: UseRadialMoveOptions, ): UseRadialMoveReturn