Next.js Discord

Discord Forum

sorting library suggestions

Unanswered
Muhammed Khal posted this in #help-forum
Open in Discord
Avatar
Which library should I use for dragging and sorting the elements in next I tried sortablejs but that’s not working in next js but it’s working on react.

Can anyone suggest me which library should I use as you might used in your projects

15 Replies

Avatar
I want to drag and sort those things
Image
Avatar
I was using react-beautiful-dnd in a side-project, but it's Pages Router
Normally adding these libraries into client components won't cause any problems
Avatar
DND kit
Avatar
@linesofcode with dnd kit I am able to achive that like the plus button for every element?
With that library can I able too achieve the thing in my app router and the buttons for every element
Avatar
European sprat
I also suggested react-dnd days ago when you first asked this
Avatar
Yes you're right
dnd kit right
I tried a lot to install react-sortable but I am getting this error
Avatar
The button is implemented by yourself, and both libraries mentioned above should be able to achieve your goal
Avatar
Image
Okay Thanks
That error with the react-sortable
Avatar
Basset Fauve de Bretagne
for those who are having the issue above, you can check out this thread https://nextjs-forum.com/post/1196470386875957259