rstudio / sortable

R htmlwidget for Sortable.js
https://rstudio.github.io/sortable/
Other
127 stars 30 forks source link

Add horizontal layout for rank_list() #94

Closed andrie closed 1 year ago

andrie commented 1 year ago

This is what a horizontal rank_list() looks like

image

As produced by this example app that's in the inst folder:

library(shiny)
library(sortable)

set.seed(123456) # to make sample() reproducible
labels <- sample(month.name[1:5])

ui <- fluidPage(
  div(
    rank_list(
      text = "Horizontal rank list",
      labels = labels,
      input_id = "rank_h",
      orientation = "horizontal"
    )
  ),
  div(
    rank_list(
      text = "Default rank list (vertical)",
      labels = labels,
      input_id = "rank"
    )
  )
)

server <- function(input, output, session) {}

shinyApp(ui, server)

First requested in #92