inst/examples/bookmarking/test-switchInput.R

library("shiny")
library("shinyWidgets")


ui <- function(request) {
  fluidPage(
    tags$h1("shinyWidgets - bookmarking"),
    textInput(inputId = "txt", label = "Text"),
    switchInput(inputId = "swh", label = "Switch"),
    checkboxInput(inputId = "chk", label = "Checkbox"),
    bookmarkButton()
  )
}

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

}

enableBookmarking("url")

shinyApp(ui, server)

Try the shinyWidgets package in your browser

Any scripts or data that you put into this service are public.

shinyWidgets documentation built on Aug. 30, 2023, 5:17 p.m.