shinydashboard icon indicating copy to clipboard operation
shinydashboard copied to clipboard

Change dashboard Header colors

Open HeleneRoyo opened this issue 3 years ago • 2 comments

I want to change my dashboard header colors without using themes (because I am using a banner, a customized style for my shiny dashboard etc.). Currently my dashboard header is a thin empty one, still useful to hide or show the sidebar menu.

Example of code and header that needs customized colors:

dashboardHeader(
      titleWidth = 260, 
      tags$li(class = "dropdown",
              tags$style(".main-header {max-height: 20px}"),
              tags$style(".main-header .logo {height: 20px;}"),
              tags$style(".sidebar-toggle {height: 20px; padding-top: 1px !important;}"),
              tags$style(".navbar {min-height:20px !important}")
      )
      )

image

Would it be useful to have a color and background.color argument in the dashboardHeader function?

HeleneRoyo avatar Jan 21 '21 13:01 HeleneRoyo

Is this what you want?

tags$style(".skin-blue .main-header .navbar {background-color: green;}")

williamlai2 avatar Aug 28 '21 05:08 williamlai2

Check library(fresh).

ismirsehregal avatar Aug 16 '22 12:08 ismirsehregal