update_slider: Update slider Semantic UI component

Description Usage Arguments See Also Examples

View source: R/slider.R

Description

Change the value of a slider_input input on the client.

Usage

1
2
3
4
5
update_slider(session, input_id, value)

update_range_input(session, input_id, value, value2)

updateSliderInput(session, inputId, value, ...)

Arguments

session

The session object passed to function given to shinyServer.

input_id

The id of the input object

value

The value to be selected for the sldier (lower value if using range).

value2

The upper value of the range.

inputId

Input name.

...

additional arguments

See Also

slider_input

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## 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)
      })
    }
  )
}

shiny.semantic documentation built on Nov. 7, 2021, 5:07 p.m.