react-use-draggable-scroll
react-use-draggable-scroll copied to clipboard
useDraggable is a React hook that allows a wrapping div to be scrolled with the mouse. It adds momentum for a nice UX and has a high performance since it does not rely on any state changes.
Thanks for the amazing hook. It would be great if when dragging it would snap to elements. For any container with overflow-x: scroll we can add this `scroll-snap-type: x mandatory;`...
In some situations, when I leave the page that has the scroll, it gives this error: https://www.loom.com/share/48c924a853c24cfea63114571aebdaff
Hey! Thanks for the library, it's really performant. I needed a small change for my project so it could get more than one button instead of only left, middle or...
Mouse cursor not switching between grab and grabbing
Hello, Does this hook also supports mobile? If so, how could I enable it? Thanks in advance.
TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
If I add ``` const ref = useRef() as React.MutableRefObject; const { events } = useDraggable(ref, { applyRubberBandEffect: true, }); ``` and `` then my page blows up with the...
Horizontal scroll add a small amount of vertical scroll. Please fix. For now to get around this, add some y padding (ex. py-2).
Hi, This is a question, not really an issue. I have a div with a fixed size that allows the user to scroll / drag like a map. The map...
I noticed that when smooth-scroll is added to an element the hook stops working. I couldn't find a way around.
Hi! I just tested your library in my project but it not working if I have this style in container element. `scroll-snap-type: y mandatory;`