chakraCombinedSlider {shinyChakraUI} | R Documentation |
Combined slider and number input
Description
A widget combining a slider and a number input.
Usage
chakraCombinedSlider(
id,
value,
min,
max,
step = NULL,
maxWidth = "400px",
numericInputOptions = numberInputOptions(),
spacing = "2rem",
keepWithinRange = TRUE,
clampValueOnBlur = TRUE,
focusThumbOnChange = FALSE,
trackColor = NULL,
filledTrackColor = NULL,
tooltip = TRUE,
tooltipOptions = sliderTooltipOptions(),
thumbOptions = sliderThumbOptions(),
...
)
Arguments
id |
widget id |
value |
initial value |
min |
minimal value |
max |
maximal value |
step |
increment step |
maxWidth |
slider width |
numericInputOptions |
list of options for the number input created with
|
spacing |
the space between the number input and the slider |
keepWithinRange |
whether to forbid the value to exceed the max or go lower than min |
clampValueOnBlur |
similar to |
focusThumbOnChange |
whether to focus the thumb on change |
trackColor |
color of the slider track |
filledTrackColor |
color of the filled slider track |
tooltip |
whether to set a tooltip to the thumb, to show the value |
tooltipOptions |
options of the tooltip, a list created with
|
thumbOptions |
list of options for the thumb created with
|
... |
other attributes passed to |
Value
A widget to use in chakraComponent
.
Examples
library(shiny)
library(shinyChakraUI)
ui <- chakraPage(
br(), br(),
chakraComponent(
"mycomponent",
chakraCombinedSlider(
"slider",
value = 5,
min = 0,
max = 10,
step = 0.5,
maxWidth = "300px",
tooltip = TRUE,
trackColor = "green.300",
thumbOptions = sliderThumbOptions(
width = 20, height = 20,
borderColor = "firebrick", borderWidth = "3px"
)
)
)
)
server <- function(input, output, session){
observe({
print(input[["slider"]])
})
}
if(interactive()){
shinyApp(ui, server)
}
[Package shinyChakraUI version 1.1.1 Index]