useDragScroll
Enables a scrollable ref
to be scrolled using drag gestures generated by a traditional mouse.
- @param
ref
- The element to attach the gesture to. - @param
options
- Configurable options - @returns void
Example
const ref = useRef<HTMLDivElement>(null)
useDragScroll(ref);
return <div ref={ref} />