I want to set the color of the titles of tabPanels in a navbarPage. I tried different approaches but couldn't figure out how to do it. Below is a reproducible example. I also tried other approaches but nothing worked.
library(shiny)
ui <-shinyUI(bootstrapPage(
"",
navbarPage(
tags$style(HTML("
.tabbable > .nav > a {font-weight: bold; color:black}
.tabbable > .nav > li > a[data-value='t1'] {color:red}
.tabbable > .nav > li > a[data-value='t2'] {color:blue}
.tabbable > .nav > li > a[data-value='t3'] {color:green}
.tabbable > .nav > li[class=active] > a {color:aqua}
")),
tabPanel("t0",h2("normal tab")),
tabPanel("t1",h2("red tab")),
tabPanel("t2",h2("blue tab")),
tabPanel("t3",h2("green tab")),
tabPanel("t4",h2("normal tab")),
tabPanel("t5",h2("normal tab"))
)
))
server <- function(input, output) {}
shinyApp(ui=ui,server=server)