Dragula: Simple drag and drop
github.com
github.com
I've been using it exclusively in a complex react app[0] for the past 3 months and I have absolutely no complaints whatsoever.
I tried out your demo page and (literally!) the first thing I did had a bug in it. Just bad luck?
There's an off-by-one error while dragging an item from the left container to the right container, but only when my mouse has just entered the right box. If I continue dragging my mouse horizontally then the item's drop placeholder corrects itself.
Screencast: http://screencast.com/t/Jw3No0wryqJ
I use ShareX for my screenshotting/quick screen recording needs.
Based on the open source MediaCrush, may it rest in peace
But Sortable is completely smooth for me, yet Dragula lags or stutters a little.
I really wonder what the difference is?
I do have to say, even though they were slower, Dragula's drag-n-drop felt more "solid", in a way. Though I would guess that's some subtle clever placement tweaks, nothing that should affect performance.
I tried a bunch of others, but Sortable was the clear winner by a fair margin.
I've been looking for a library that supports nested containers. For an example of drag and drop with nested containers see https://www.bkmks.com/
A tree mode would be awesome, where you can drag elements to be children of other elements as well as siblings.
Also resizing is one thing you can look into. Grid kind of a thing. That makes it a complete package.
What about other JavaScript DnD libs; which one's do implement keyboard accessibility?
EDIT there's a bad autocorrect in there but I'm going to leave it
I understand what you're saying and commend you for it, but other developers might not want to implement all that themselves, or more often than not, might not even be aware that they have to. In other words, a JavaScript library with zero accessibility features gets added to one hundred websites over night, and in an instant, you have one hundred inaccessible websites. It is an all too common pattern in recent years, as most projects, even the big ones, don't even include accessible examples.
Asking if it 'implements' keyboard accessibility is like asking if a box of hardware tools implements wheelchair accessibility – it might be possible to build something wheelchair-accessible using the toolbox, but that's up to you.
I completely agree that there are lots of devs who won't consider accessibility when using this or other DnD libraries, and that's a shame, but it's not the place of a DnD library to magically create an alternative keyboard UI that somehow corresponds with whatever drag-and-drop UI you've built using the library. That just couldn't work. A human needs to think about it.
So yeah, it's not part of the lib but it's deadbrain-easy to add on top.
I'm biased on the keyboarding should be required perspective: I deal with accessibility day in and day out, and a library such as this had to be ripped out and removed from the organization, simply because junior developers would prototype and ship without thinking about that required use-case of keyboard access.
Google chrome 43.0.2357.134 m, windows 8.
I see the hind icon but trying to drag selects text/elements instead.
I refreshed page and it started working.
Edit: also, Gridster shuffles the panels around nicely in both axes and allows resizing which is very useful