Could you help me change the color of the "flatly" theme or maybe help me adjust it to green color? I insert the "flatly" theme just as an example! I would like to change the color of that top part (image attached).
I believe the CSS needs to be tweaked, but I don't know how to handle it very well, so any help is welcome. I put the default glossy app as a reproducible example.
Thank you very much!
library(shiny)
library(shinythemes)
ui <- shiny::navbarPage(theme = shinytheme("flatly"),collapsable = TRUE,
titlePanel(""),
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 1,
max = 50,
value = 30)
),
mainPanel(
plotOutput("distPlot")
)
)
)
server <- function(input, output) {
output$distPlot <- renderPlot({
x <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = input$bins + 1)
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
}
shinyApp(ui = ui, server = server)
To theme a Shiny app, also check out the bslib package. From the docs: " The bslib R package provides tools for customizing Bootstrap themes directly from R, making it much easier to customize the appearance of Shiny apps & R Markdown documents."
@maelle, I saw that this package is new, right? Do you happen to have a concrete example that you can show me or maybe use this package for the executable code I inserted above. Thanks again!