Home > Software engineering >  Change the color and icon of the gear of shinydashboard dashboardControlBar
Change the color and icon of the gear of shinydashboard dashboardControlBar

Time:11-26

How can someone change the color and icon of the gear of shinydashboard dashboardControlBar?

library(shiny)

shinyApp(
  ui = dashboardPage(
    header = dashboardHeader(),
    sidebar = dashboardSidebar(),
    body = dashboardBody(
      #tags$style(".fa-thumbtack {color:rgb(255,0,0)}"), ##  this changes only the horizontal pin color
      tags$head(tags$style(type = "text/css", ".fa-thumbtack {color:rgb(255,0,0)  !important;}"))
    ),
    controlbar = dashboardControlbar(
      id = "controlbar",
      collapsed = FALSE,
      overlay = TRUE, 
      skin = "light",
      pinned = T
    )
  ),
  server = function(input, output, session) {
  }
)

CodePudding user response:

  1. To change the color use skin = where you can set various colors: see here enter image description here

  • Related