chakraRangeSlider {shinyChakraUI} | R Documentation |
Chakra range slider
Description
Create a Chakra range slider.
Usage
chakraRangeSlider(
id,
label = NULL,
values,
min,
max,
step = NULL,
width = NULL,
size = "md",
colorScheme = "blue",
orientation = "horizontal",
focusThumbOnChange = TRUE,
isDisabled = FALSE,
isReadOnly = FALSE,
isReversed = FALSE,
trackColor = NULL,
filledTrackColor = NULL,
tooltip = TRUE,
tooltipOptions = sliderTooltipOptions(),
thumbOptionsLeft = sliderThumbOptions(),
thumbOptionsRight = sliderThumbOptions(),
shinyValueOn = "end",
...
)
Arguments
id |
widget id |
label |
label (optional) |
values |
the two initial values |
min |
minimal value |
max |
maximal value |
step |
increment step |
width |
slider width |
size |
size, |
colorScheme |
a Chakra color scheme |
orientation |
slider orientation, |
focusThumbOnChange |
whether to focus the thumb on change |
isDisabled |
whether to disable the slider |
isReadOnly |
read only mode |
isReversed |
whether to reverse the slider |
trackColor |
color of the track |
filledTrackColor |
color of the filled track |
tooltip |
whether to set a tooltip to the thumb |
tooltipOptions |
options of the tooltip, a list created with
|
thumbOptionsLeft |
list of options for the left thumb, created with
|
thumbOptionsRight |
list of options for the right thumb, created with
|
shinyValueOn |
either |
... |
other attributes passed to |
Value
A widget to use in chakraComponent
.
Examples
# Run `chakraExample("RangeSlider")` to see a better example.
library(shiny)
library(shinyChakraUI)
ui <- chakraPage(
br(),
chakraComponent(
"mycomponent",
chakraRangeSlider(
"slider",
label = HTML("<span style='color:red'>Hello range slider!</span>"),
values = c(2, 8),
min = 0,
max = 10,
width = "50%",
tooltip = TRUE,
tooltipOptions = sliderTooltipOptions(placement = "bottom"),
shinyValueOn = "end"
)
)
)
server <- function(input, output, session){
observe({
print(input[["slider"]])
})
}
if(interactive()){
shinyApp(ui, server)
}
[Package shinyChakraUI version 1.1.1 Index]