Description Usage Arguments Value Examples
Create a Chakra range slider.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 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",
...
)
|
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 |
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 | # 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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.