Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move items between two list boxes shiny

Tags:

shiny

Is there an easy way to create something like this in shiny?

enter image description here

like image 842
Charles Stangor Avatar asked Oct 29 '25 22:10

Charles Stangor


1 Answers

RStudio is currently working on the sortable package: RStudio/sortable

Beware that it's currently in development (tagged as experimental), so major changes are possible and it's only accessble through GitHub

# install.packages("remotes")
# remotes::install_github("rstudio/sortable")

library(shiny)
library(sortable)

ui <- fluidPage(
    fluidRow(
        column(
            width = 12,
            bucket_list(
                header = "Drag the items in any desired bucket",
                group_name = "bucket_list_group",
                add_rank_list(
                    text = "Drag from here",
                    labels = c("Ant", "Cat", "Eagle", "Giraffe", "Bear", "Frog","Dog"),
                    input_id = "rank_list_1"
                ),
                add_rank_list(
                    text = "to here",
                    labels = NULL,
                    input_id = "rank_list_2"
                )
            )
        )
    )
)

shinyApp(ui, function(input,output) {})

This results in: Example image for sortable bucketlist

like image 52
Thomas Avatar answered Nov 02 '25 22:11

Thomas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!