Draggable JS vs Select2: What are the differences?
What is Draggable JS? A lightweight, responsive, modern drag-and-drop library (by Shopify). Draggable is a modular drag & drop library, allowing you to start small and build up with the features you need. At its most basic, Draggable gives you drag & drop functionality, fast DOM reordering, accessible markup, and a bundle of events to grab on to.
What is Select2? The jQuery replacement for select boxes. It gives you a customizable select box with support for searching, tagging, remote data sets, infinite scrolling, and many other highly used options. It comes with support for RTL environments, searching with diacritics and over 40 languages built-in.
Some of the features offered by Draggable JS are:
- Works with native drag, mouse, touch and force touch events
- Can extend dragging behaviour by hooking into draggables event life cycle
- Can extend drag detection by adding sensors to draggable
On the other hand, Select2 provides the following key features:
- comes with support for RTL environments, searching with diacritics and over 40 languages built-in
- Using AJAX you can efficiently search large lists of items
- Fully skinnable, CSS built with Sass and an optional theme for Bootstrap 3
Draggable JS and Select2 are both open source tools. Select2 with 23.9K GitHub stars and 5.68K forks on GitHub appears to be more popular than Draggable JS with 13.4K GitHub stars and 708 GitHub forks.