
Last chance! 50% off unlimited learning
Sale ends in
Change the value of a slider input on the client
updateF7Slider(
session,
inputId,
min = NULL,
max = NULL,
value = NULL,
scale = FALSE,
scaleSteps = NULL,
scaleSubSteps = NULL,
step = NULL,
color = NULL
)
The session object passed to function given to the server.
The id of the input object.
Slider minimum range.
Slider maximum range
Slider value or a vector containing 2 values (for a range).
Slider scale.
Number of scale steps.
Number of scale sub steps (each step will be divided by this value).
Slider increase step size.
See getF7Colors for valid colors.
# NOT RUN {
if(interactive()){
library(shiny)
library(shinyMobile)
shinyApp(
ui = f7Page(
title = "My app",
f7SingleLayout(
navbar = f7Navbar(title = "updateF7Slider"),
f7Card(
f7Button(inputId = "update", label = "Update slider"),
f7Slider(
inputId = "obs",
label = "Range values",
max = 500,
min = 0,
step = 1,
color = "deeppurple",
value = c(50, 100)
),
verbatimTextOutput("test")
)
)
),
server = function(input, output, session) {
output$test <- renderPrint({input$obs})
observeEvent(input$update, {
updateF7Slider(
session,
inputId = "obs",
value = c(1, 5),
min = 0,
scaleSteps = 10,
scaleSubSteps = 5,
step = 0.1,
max = 10,
color = "teal"
)
})
}
)
}
# }
Run the code above in your browser using DataLab