Reputation: 522
I was trying to change the color of navbar on top of the page. I've searched many resources but only found how I could change the color on mainPanel. I am totally new to CSS so I have no idea how I can insert the code into my app. Can anyone show me some examples?
This is my Shiny app:
navbarPage
I'd like to turn it into this: Black color
Cuz my code is too long to be put here. The structure looks like
shinyUI(navbarPage("title1",
tabPanel("title2",
sidebarLayout(
sidebarPanel(
)
)
)
)
Many thanks in advance.
Upvotes: 3
Views: 4288
Reputation: 32426
The navbarPage
has an inverse
argument to change the class to navbar-inverse, so you don't need to mess with the css at all luckily.
library(shiny)
ui <- shinyUI(navbarPage(inverse=TRUE,
"title1", tabPanel("title2",
sidebarLayout(sidebarPanel(), mainPanel()))))
server <- function(input, output) {}
shinyApp(ui, server)
Upvotes: 4