dreamRs / fresh

Fresh shiny themes
https://dreamrs.github.io/fresh/
GNU General Public License v3.0
224 stars 10 forks source link

styling font-color for tab panels (shiny) #10

Closed rbcavanaugh closed 3 years ago

rbcavanaugh commented 3 years ago

Thanks for a great package. Is there anyway to change the font color for tab panels for {shiny}? For example, I would like to change the 'aqua' #18BC9C color in flatly to black. I can do this in a separate CSS file, but it would be nice to generate a single theme from fresh.

cheers -

pvictor commented 3 years ago

The color used in tabs is the color defined for links, yon can change it like this (note that this will apply to all links in your application):


library(shiny)
library(fresh)

ui <- fluidPage(
  use_theme(create_theme(
    bs_vars_global(link_color = "red"),
    bs_vars_pills(active_link_hover_bg = "red")
  )),
  tabsetPanel(
    tabPanel("Plot"),
    tabPanel("Summary")
  ),
  tabsetPanel(
    tabPanel("Plot"),
    tabPanel("Summary"),
    type = "pills"
  )
)

server <- function(input, output, session) {

}

shinyApp(ui, server)

image

Victor

rbcavanaugh commented 3 years ago

perfect, thank you!