md_sidebar: Create dashboard sidebar

Description Usage Arguments Examples

Description

Create dashboard sidebar

Usage

1
2
3
md_sidebar(..., title = "My Dashboard", color = "green",
  background_color = "white", background_image = TRUE,
  title_url = NULL)

Arguments

...

Items to put in the dashboard sidebar.

title

Title to display in the top side of the sidebar.

color

Sidebar color theme.

background_color

Sidebar's background color.

background_image

Sidebar's background image.

title_url

Title's redirect URL.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if (interactive()) {
  library(shiny)
  library(shinymd)

  ui = md_page(
    header = md_header(),
    sidebar = md_sidebar(
      title = 'Dashboard Title',
      md_sidebar_menu(
        md_sidebar_menu_item(
          title = 'Tab 1',
          tab_name = 'tab_1',
          icon = md_icon('loyalty')
        ),
        md_sidebar_menu_item(
          title = 'Tab 2',
          tab_name = 'tab_2',
          icon = md_icon('face')
        )
      )
    ),
    body = md_body()
  )

  server = function(input, output, session) {}

  shinyApp(ui, server)
}

pythonjokeun/shinymd documentation built on May 12, 2019, 10:52 a.m.