45 ms·
I've heard good things about dragula[0]. It's 9.8kb minified[1], no dependencies and browser support goes all the way back to IE7. There are also bridges for al
by lhorie 6y ago
I've heard good things about dragula[0]. It's 9.8kb minified[1], no dependencies and browser support goes all the way back to IE7. There are also bridges for all the major frameworks.
[0] https://bevacqua.github.io/dragula/ https://bevacqua.github.io/dragula/
[1] https://bundlephobia.com/result?p=dragula@3.7.3 https://bundlephobia.com/result?p=dragula@3.7.3
- wirahx 6y agocan confirm that dragula works well. If you don't need all the crazy browser support though, doing it like this is much more lightweight.
- duhi88 6y agoLooks pretty solid to me. Good demos of some common edge-cases. I wouldn't say "all" the major frameworks, though (just Angular[JS] and React).
- lhorie 6y agoThere are also vue bridges, though admittedly unofficial.
- chrismorgan 6y agoThat’s not no dependencies, it’s two direct dependencies, one of which is crossvent, which is 2.2kB of stuff that’s mostly not used (only around 0.6kB of it is used). There are also a couple more transitive dependencies. But the 9.8kB figure does include all the dependencies. I actively hate spending bytes supporting IE (and especially such ancient versions as IE7), and if necessary maintain forks of any libraries I use to avoid doing so; so I tried ripping out IE support along with crossvent and a few obsolete and/or bad abstractions, and quickly got it down to 7kB minified, and I expect one so inclined could shrink it further. (The crossvent part can be done in two minutes, it’s that simple.) I should really make a feature of this kind of thing on my blog, I enjoy doing it so much.