Track the position of the pointer inside an element as a value between 0 and 1.
This is custom React hooks, you need to follow the Basic Rules when you use it.
Press and drag inside the box to move the dot.
const useMove = <T extends HTMLElement = HTMLElement>(
onChange: (value: { x: number; y: number }) => void,
onScrubEnd?: () => void,
) => { ref: RefObject<T | null>; active: boolean }