Learn R Programming

semantic.dashboard (version 0.1.5)

dashboard_page: Create a dashboard.

Description

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

Usage

dashboard_page(
  header,
  sidebar,
  body,
  title = "",
  suppress_bootstrap = TRUE,
  theme = NULL
)

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

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 SemanticUI 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 TODO list of themes

Value

Dashboard.

Functions

  • dashboardPage: Create a dashboard (alias for dashboard_page 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