Description Usage Arguments Value Examples
Create a Chakra 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 25 | chakraSlider(
id,
label = NULL,
value,
min,
max,
step = NULL,
width = NULL,
size = "md",
colorScheme = "blue",
orientation = "horizontal",
focusThumbOnChange = TRUE,
isDisabled = FALSE,
isReadOnly = FALSE,
isReversed = FALSE,
trackColor = NULL,
filledTrackColor = NULL,
mark = FALSE,
markOptions = sliderMarkOptions(),
tooltip = TRUE,
tooltipOptions = sliderTooltipOptions(),
thumbOptions = sliderThumbOptions(),
shinyValueOn = "end",
...
)
|
id |
widget id |
label |
label (optional) |
value |
initial value |
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 |
mark |
whether to set a mark to the thumb (I personally prefer the tooltip) |
markOptions |
options of the mark, a list created with
|
tooltip |
whether to set a tooltip to the thumb |
tooltipOptions |
options of the tooltip, a list created with
|
thumbOptions |
list of options for the 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 | library(shiny)
library(shinyChakraUI)
ui <- chakraPage(
br(),
chakraComponent(
"mycomponent",
chakraSlider(
"slider",
label = HTML("<span style='color:red'>Hello slider!</span>"),
value = 5,
min = 0,
max = 10,
width = "50%",
tooltip = TRUE,
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.