Description Usage Arguments Value Examples
View source: R/chakraCombinedSlider.R
A widget combining a slider and a number input.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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(),
...
)
|
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 |
A widget to use in chakraComponent
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.