## Only run this example in interactive R sessions
if (interactive()) {
shinyApp(
ui = semanticPage(
p("The first slider controls the second"),
slider_input("control", "Controller:", min = 0, max = 20, value = 10,
step = 1),
slider_input("receive", "Receiver:", min = 0, max = 20, value = 10,
step = 1)
),
server = function(input, output, session) {
observe({
update_slider(session, "receive", value = input$control)
})
}
)
}
Run the code above in your browser using DataLab