Next.js Discord

Discord Forum

Draggable Component

Unanswered
Bigeye tuna posted this in #help-forum
Open in Discord
Bigeye tunaOP
I've been searching for a draggable component, where you can move certain divs in a container, which will change the index in a dictionary.
Every library that I found either doesn't work/abandoned or its not supporting grid layouts like this: https://i.guns.lol/OCqOe

5 Replies

Toyger
maybe this https://github.com/react-grid-layout/react-grid-layout
or react-draggable and it's forks, it's pretty configurable, here is example https://codesandbox.io/s/new-ldk4vk
the lib used in the sandbox isnt mobile supported i think..
@Bigeye tuna the lib used in the sandbox isnt mobile supported i think..
Toyger
ideally, you don't allow draggable elements in browser on mobile, because it's massive headache to implement and maintain.