dashboard_page: Create a dashboard.

Description Usage Arguments Value Functions Examples

View source: R/semantic_dashboard.R

Description

Create a page with menu item sidebar and body containing tabs and other additional elements.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
dashboard_page(
  header,
  sidebar,
  body,
  title = "",
  suppress_bootstrap = TRUE,
  theme = NULL,
  margin = TRUE,
  class = "",
  sidebar_and_body_container_class = ""
)

dashboardPage(
  header,
  sidebar,
  body,
  title = "",
  suppress_bootstrap = TRUE,
  theme = NULL,
  margin = TRUE,
  class = "",
  sidebar_and_body_container_class = ""
)

Arguments

header

Header of a dashboard.

sidebar

Sidebar of a dashboard.

body

Body of a dashboard.

title

Title of a dashboard.

suppress_bootstrap

There are some conflicts in CSS styles between FomanticUI and Bootstrap. For the time being it's better to suppress Bootstrap. If TRUE bootstrap dependency from shiny will be disabled.

theme

Theme name or path. For possible options see semanticPage.

margin

If TRUE, margin to be applied to the whole dashboard. Defaults to TRUE.

class

CSS class to be applied to the page container (<body> tag).

sidebar_and_body_container_class

CSS class to be applied to the div containing dashboardSidebar and dashboardBody.

Value

Dashboard.

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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)
}

Example output

Attaching package:semantic.dashboardThe following object is masked frompackage:graphics:

    box

semantic.dashboard documentation built on Nov. 10, 2021, 1:06 a.m.