dashboard_header {semantic.dashboard} | R Documentation |
Create a header of a dashboard.
Description
Create a header of a dashboard with other additional UI elements.
Hint: use shiny::tagList()
if you want to add multiple elements in left
/ center
or right
.
Usage
dashboard_header(
...,
left = NULL,
center = NULL,
right = NULL,
title = NULL,
titleWidth = "thin",
logo_align = "center",
logo_path = "",
color = "",
inverted = FALSE,
disable = FALSE,
show_menu_button = TRUE,
menu_button_label = "Menu",
class = ""
)
dashboardHeader(
...,
left = NULL,
center = NULL,
right = NULL,
title = NULL,
titleWidth = "thin",
logo_align = "center",
logo_path = "",
color = "",
inverted = FALSE,
disable = FALSE,
show_menu_button = TRUE,
menu_button_label = "Menu",
class = ""
)
Arguments
... |
UI elements to include within the header. They will be displayed on the right side. |
left |
UI element to put on the left of the header. It will be placed after (to the right) the title and menu button (if they exist). |
center |
UI element to put in the center of the header. |
right |
UI element to put to the right of the header. It will be placed before elements defined in |
title |
Dashboard title to be displayed in the upper left corner. If NULL, will not display any title field. Use "" for an empty title. |
titleWidth |
Title field width, one of |
logo_align |
Where should logo be placed. One of |
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 |
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 |
disable |
If |
show_menu_button |
If |
menu_button_label |
Text of the menu button. Default is |
class |
CSS class to be applied to the container of |
Value
A header that can be passed to dashboardPage
Functions
-
dashboardHeader
: Create a header of a dashboard (alias fordashboard_header
for compatibility withshinydashboard
)
Examples
if(interactive()) {
library(shiny)
library(semantic.dashboard)
ui <- dashboardPage(
dashboardHeader(color = "blue", inverted = TRUE),
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)
}