Changing header color

There are two ways to change the header background color of the card panel.

  • During the code set up of the shiny app, within the card.pro::card.pro() function
  • While using the shiny app after launch, user changes will be retained when they refresh the app

Changing header color in code

When setting up the shiny app, simply specify the header color to use in the card. Keep in mind that the use.cardpro() can also be altered to further refine the color output.

You may change the overall color output and styles using the theme argument in use.cardpro() as shown below.

# Selectable themes are  “a” or “b” or “c” or “d” or “e”

card.pro::use.cardpro(theme = "a")

# NOTE: use.cardpro MUST be called within the shiny::fluidPage() function

The second way to change the header background color is within the card.pro() function

# Selectable header.bg are  "white" or "green" or "greenDark" or "greenLight" or "purple" or "magenta" or "pink" or "pinkDark" or "blueLight" or "teal" or "blue" or "blueDark" or "darken" or "yellow" or "orange" or "orangeDark" or "red" or "redLight"

card.pro::card.pro("Some content text", title = "Select BG", header.bg = "darken")

# NOTE: card.pro MUST be called within the shiny::fluidPage() function

When the shiny app launches, the chosen header background color will be used.

Changing header color during use of app

In order to allow users to change the header background color while using the app, the shiny app creator needs to enable the option within the code as shown below by setting the colorbtn argument to TRUE

card.pro::card.pro("Some content text...", title = "Summary table", colorbtn = TRUE)

When the app is being used, the user is able to alter the color of the header background color as show in the image below. Please note that this header background color change will only be retained for the particular user across sessions. It will not affect the interface of the app for other users, whom may also choose their desired header color.