

sortable
R htmlwidget for Sortable.js
The sortable package brings drag-and-drop functionality to R Shiny applications by wrapping the SortableJS JavaScript library as an htmlwidget. It works in Shiny apps, learnr tutorials, and R Markdown documents, and includes a custom learnr question type called question_rank() for creating ranking exercises.
The package provides three main components: rank_list() for creating single sortable lists with configurable behaviors like multi-drag and item swapping, bucket_list() for building multiple interconnected lists useful for classification tasks, and sortable_js() for adding drag-and-drop to any HTML element or widget. These tools make it straightforward to build interactive ranking exercises, categorization tasks, or reorderable UI components without writing JavaScript.


