Learn R Programming

semantic.dashboard (version 0.1.5)

dashboard_header: Create a header of a dashboard.

Description

Create a header of a dashboard with other additional UI elements.

Usage

dashboard_header(
  ...,
  logo_align = "center",
  logo_path = "",
  color = "",
  inverted = FALSE,
  disable = FALSE
)

dashboardHeader( ..., logo_align = "center", logo_path = "", color = "", inverted = FALSE, disable = FALSE )

Arguments

...

UI elements to include within the header.

logo_align

Where should logo be placed. One of c("left", "center")

logo_path

Path or URL of the logo to be shown in the header.

color

Color of the sidebar / text / icons (depending on the value of `inverted` parameter. \ One of c("", "red", "orange", "yellow", "olive", "green", "teal", "blue", "violet", "purple", "pink", "brown", "grey", "black")

inverted

If FALSE sidebar will be white and text will be colored. \ If TRUE text will be white and background will be colored. Default is FALSE.

disable

If TRUE, don't display the header.

Value

A header that can be passed to dashboardPage

Functions

  • dashboardHeader: Create a header of a dashboard (alias for dashboard_header for compatibility with shinydashboard)

Examples

Run this code
# NOT RUN {
if(interactive()){

  library(shiny)
  library(semantic.dashboard)

  ui <- dashboardPage(
    dashboardHeader(color = "blue"),
    dashboardSidebar(side = "left", size = "thin", color = "teal",
                     sidebarMenu(
                       menuItem(tabName = "tab1", "Tab 1"),
                       menuItem(tabName = "tab2", "Tab 2"))),
    dashboardBody(tabItems(
      tabItem(tabName = "tab1", p("Tab 1")),
      tabItem(tabName = "tab2", p("Tab 2"))))
  )

  server <- function(input, output) {
  }

  shinyApp(ui, server)
}
# }

Run the code above in your browser using DataLab