View source: R/input-noUiSlider.R
noUiSliderInput | R Documentation |
A minimal numeric range slider with a lot of features.
noUiSliderInput( inputId, label = NULL, min, max, value, step = NULL, tooltips = TRUE, connect = TRUE, padding = 0, margin = NULL, limit = NULL, orientation = c("horizontal", "vertical"), direction = c("ltr", "rtl"), behaviour = "tap", range = NULL, pips = NULL, format = wNumbFormat(), update_on = c("end", "change"), color = NULL, inline = FALSE, width = NULL, height = NULL )
inputId |
The |
label |
Display label for the control, or NULL for no label. |
min |
Minimal value that can be selected. |
max |
Maximal value that can be selected. |
value |
The initial value of the slider. as many cursors will be created as values provided. |
step |
numeric, by default, the slider slides fluently. In order to make the handles jump between intervals, you can use the step option. |
tooltips |
logical, display slider's value in a tooltip above slider. |
connect |
logical, vector of length |
padding |
numeric, padding limits how close to the slider edges handles can be. |
margin |
numeric, when using two handles, the minimum distance between the handles can be set using the margin option. |
limit |
numeric, the limit option is the opposite of the |
orientation |
The orientation setting can be used to set the
slider to |
direction |
|
behaviour |
Option to handle user interaction, a value or several between
|
range |
list, can be used to define non-linear sliders. |
pips |
list, used to generate points along the slider. |
format |
numbers format, see |
update_on |
When to send value to server: |
color |
color in Hex format for the slider. |
inline |
If |
width |
The width of the input, e.g. |
height |
The height of the input, e.g. |
a ui definition
See updateNoUiSliderInput()
for updating slider value server-side.
And demoNoUiSlider()
for examples.
library(shiny) library(shinyWidgets) ui <- fluidPage( tags$h2("noUiSliderInput example"), noUiSliderInput( inputId = "noui1", min = 0, max = 100, value = 20 ), verbatimTextOutput(outputId = "res1"), tags$br(), noUiSliderInput( inputId = "noui2", label = "Slider vertical:", min = 0, max = 1000, step = 50, value = c(100, 400), margin = 100, orientation = "vertical", width = "100px", height = "300px" ), verbatimTextOutput(outputId = "res2") ) server <- function(input, output, session) { output$res1 <- renderPrint(input$noui1) output$res2 <- renderPrint(input$noui2) } if (interactive()) shinyApp(ui, server)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.