dndselectr: dndselectr: Implements a drag-and-drop Shiny select input

Description See Also Examples

Description

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.

See Also

dragZone, dropZoneInput

Examples

 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) {
  }
)
}

serenity-r/dragulaSelectR documentation built on March 18, 2021, 10:35 a.m.