Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Drag and drop components in react

I am trying to develop a dashboard in ReactJS and I plan to do draggable components, for example like a Spotify playlist where I drag a song to another position and the other songs auto adjust their position and don’t overlap, and I wanted to know if anyone knows of a way to do this, since I searched and the only thing I found was draggable components that can overlap each other.

Edit:
Thank you for the suggestion, react-beautiful-dnd was exactly what I was looking for.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

There are several React libraries that can help you create draggable components with auto-adjustment, such as React DnD (Drag and Drop) and React Beautiful DnD. Both of these libraries have features for creating draggable lists, like the Spotify playlist you mentioned, where items automatically adjust their position when dragged and dropped.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading