md_body: Create a dashboard body

Description Usage Arguments Examples

Description

Create a dashboard body

Usage

1

Arguments

...

Items to put. Typically md_tab_items.

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
29
30
31
32
33
34
35
36
37
38
39
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(
      md_tab_items(
        md_tab_item(
          tab_name = 'tab_1',
          tags$h2('Tab 1 content')
        ),
        md_tab_item(
          tab_name = 'tab_2',
          tags$h2('Tab 2 content')
        )
      )
    )
  )

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

  shinyApp(ui, server)
}

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