Hi,
Have a look at https://github.com/dreamRs/shinyWidgets/blob/master/R/setSliderColor.R and https://github.com/dreamRs/shinyWidgets/blob/master/R/chooseSliderSkin.R
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
chooseSliderSkin("Flat", color = "#112446"),
sliderInput("obs", "Customized single slider:",
min = 0, max = 100, value = 50
),
sliderInput("obs2", "Customized range slider:",
min = 0, max = 100, value = c(40, 80)
),
sliderInput("obs3", "An other slider:",
min = 0, max = 100, value = 50
),
plotOutput("distPlot")
)
server <- function(input, output) {
output$distPlot <- renderPlot({
hist(rnorm(input$obs))
})
}
shinyApp(ui, server)
and
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
# only customize the 2 first sliders and the last one
# the color of the third one is empty
setSliderColor(c("DeepPink ", "#FF4500", "", "Teal"), c(1, 2, 4)),
sliderInput("obs", "My pink slider:",
min = 0, max = 100, value = 50
),
sliderInput("obs2", "My orange slider:",
min = 0, max = 100, value = 50
),
sliderInput("obs3", "My basic slider:",
min = 0, max = 100, value = 50
),
sliderInput("obs3", "My teal slider:",
min = 0, max = 100, value = 50
),
plotOutput("distPlot")
)
server <- function(input, output) {
output$distPlot <- renderPlot({
hist(rnorm(input$obs))
})
}
shinyApp(ui, server)