I'm creating senior tabs with sub-tabs beneath in order to funnel users through myriad choices. In order to show users which sub-tabs go with which senior tabs, I shade the non-active senior tabs and remove all shading for the active senior tabs. I'd also like to similarly un-shade all sub-tabs, as shown in the image below. Any recommendations for how to do this? This is a follow-on to post Background color of tabs in shiny tabPanel, where I base the below code on the first answer to that post:
I'm open to any suggestions for beautifying the tabs too!
Code:
library(shiny)
library(shinyjs)
ui <-shinyUI(fluidPage(
h1("Tabs"),
tags$style(HTML("
.tabbable > .nav > li > a {background-color: #E0E0E0; color:black}
.tabbable > .nav > li[class=active] > a {background-color: white;color:black}
")),
tabsetPanel(
tabPanel("Tab 1", div(style = "margin-top: 5px"),
tabsetPanel(
tabPanel("Tab 1 subtab A"),
tabPanel("Tab 1 subtab B")
)
),
tabPanel("Tab 2", div(style = "margin-top: 5px"),
tabsetPanel(
tabPanel("Tab 2 subtab A"),
tabPanel("Tab 2 subtab B")
)
),
tabPanel("Tab 3",h2("senior tab 3")),
tabPanel("Tab 4",h2("senior tab 4")),
tabPanel("Tab 5",h2("senior tab 5")),
tabPanel("Tab 6",div(style = "margin-top: 5px"),
tabsetPanel(
tabPanel("Tab 6 subtab A"),
tabPanel("Tab 6 subtab B")
)
)
)
))
server <- function(input, output) {}
shinyApp(ui=ui,server=server)