In Shiny, on the UI side my code is:
mainPanel(uiOutput('my_tabsetpanel'))
and on the Server side I have:
output$my_tabsetpanel <- renderUI({
tabPanel(mytabtitle, DT::dataTableOutput(id))
})
How can I change only the color of the tab title?
You could wrap the title in a div
and change the style.
Here is an example:
library(shiny)
ui <- fluidPage(
mainPanel(uiOutput('my_tabsetpanel'))
)
server <- function(input, output) {
output$my_tabsetpanel <- renderUI({
tabsetPanel(tabPanel(div("mytabtitle", style = "color: red;"), "my content"))
})
}
shinyApp(ui = ui, server = server)
Result: