useRadialMove

Track the angle of the pointer around the center of an element, from 0 to 360 degrees.

This is custom React hooks, you need to follow the Basic Rules when you use it.

General

Press and drag around the circle to turn the hand.

APIs

useRadialMove

const useRadialMove = <T extends HTMLElement = HTMLElement>(
  onChange: (value: number) => void,
  options?: { step?: number; onChangeEnd?: (value: number) => void },
) => { ref: RefObject<T | null>; active: boolean }
Edit this page on GitHub