Create a dropdown menu for a navbar_page.

navbar_menu(title, ..., id = title, icon = NULL)

Arguments

title

Display title for menu

...

tab_panel elements to include in the page. Can also include strings as section headers, or "----" as a horizontal separator.

id

The ID of the navbar_menu

icon

Optional icon to appear on the tab. This attribute is only valid when using a tab_panel within a navbar_page.

Value

A structured list of class ssnavmenu, that can be used in navbar_page.

Examples

navbar_menu(
  "Menu",
  tab_panel("Summary", shiny::plotOutput("plot")),
  "----",
  "Section header",
  tab_panel("Table", shiny::tableOutput("table"))
)
#> $title
#> [1] "Menu"
#> 
#> $id
#> [1] "Menu"
#> 
#> $tabs
#> $tabs[[1]]
#> <div class="ui tab bottom attached segment" data-title="Summary" data-tab="Summary">
#>   <div id="plot" class="shiny-plot-output" style="width:100%;height:400px;"></div>
#> </div>
#> 
#> $tabs[[2]]
#> [1] "----"
#> 
#> $tabs[[3]]
#> [1] "Section header"
#> 
#> $tabs[[4]]
#> <div class="ui tab bottom attached segment" data-title="Table" data-tab="Table">
#>   <div id="table" class="shiny-html-output"></div>
#> </div>
#> 
#> 
#> $icon
#> NULL
#> 
#> attr(,"class")
#> [1] "ssnavmenu"