Skip to contents

An animated slider component that takes a list for options. Value is reset when options change.

Usage

ListSlider.shinyInput(inputId, ..., value = defaultValue)

Arguments

inputId

The input id

...

args to pass to the element

value

value of default value.

Examples

library(shiny.mui)
library(shiny)


if (interactive()) {
  shinyApp(
    ui = div(
      Box(),
      ListSlider.shinyInput("val", value = 5, options = seq(1, 10)),
      textOutput("textValue"),
      ListSlider.shinyInput("multival", value = c(1,5), options = seq(1, 10)),
      textOutput("multival")
    ),
    server = function(input, output) {
      output$textValue <- renderText({
        sprintf("Value: %s", input$val)
      })
      output$multival <- renderText({
        input$multival
      })
    }
  )
}