In Shiny, the ion-rangeslider is utilized from this source. By tweaking the code, I managed to change the color and some properties of the slider. The snippet below creates a standard slider with a green button and a range slider with red buttons.
Now, my aim is to give each button on the range slider its own unique color. For example, I'd like them to be red and blue instead of all being red. Is there a way to achieve this?
https://i.sstatic.net/cfgV5.png
library(shiny)
ui <- fluidPage(
sliderInput("test1",
"Select a value:",
min = 0,
max = 50,
value = 20),
sliderInput("test2",
"Select a range:",
min = 0,
max = 50,
value = c(30, 40)),
tags$style(type = "text/css",
HTML(".js-irs-0 .irs-slider { width: 8px; height: 20px; top: 20px; background: green }",
".js-irs-1 .irs-slider { width: 8px; height: 20px; top: 20px; background: red }"))
)
server <- function(input, output) {
}
shinyApp(ui = ui, server = server)