Implements a drag-and-drop Shiny select input. This implementation creates a Shiny input that replicates much of the functionality of selectInput. Multiple zones for dragging and dropping are allowed. Currently utilizes Dragula JS library, https://github.com/bevacqua/dragula.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Only run examples in interactive R sessions
if (interactive()) {
# basic example
shinyApp(
  ui = fluidPage(
    column(6,
      dragZone("dragzone", choices = list(one = "One",
                                          two = "Two",
                                          three = "Three",
                                          four = "Four"))
      ),
    column(6,
      dropZoneInput("dropzone", choices = list(one = "1",
                                               two = "2",
                                               three = "3",
                                               four = "4"),
                                highlight = TRUE)
      )
  ),
  server = function(input, output) {
  }
)
}
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.