Create a tab panel

tab_panel(
  title,
  ...,
  value = title,
  icon = NULL,
  type = "bottom attached segment"
)

Arguments

title

Display title for tab

...

UI elements to include within the tab

value

The value that should be sent when navbar_menu reports that this tab is selected. If omitted and navbar_menu has an id, then the title will be used.

icon

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

type

Change depending what type of tab is wanted. Default is bottom attached segment.

Value

A tab that can be passed to navbar_menu.

See also

Examples

navbar_menu(
  tab_panel("Plot", shiny::plotOutput("plot")),
  tab_panel("Summary", shiny::verbatimTextOutput("summary")),
  tab_panel("Table", shiny::tableOutput("table"))
)
#> $title
#> <div class="ui tab bottom attached segment" data-title="Plot" data-tab="Plot">
#>   <div id="plot" class="shiny-plot-output" style="width:100%;height:400px;"></div>
#> </div>
#> 
#> $id
#> <div class="ui tab bottom attached segment" data-title="Plot" data-tab="Plot">
#>   <div id="plot" class="shiny-plot-output" style="width:100%;height:400px;"></div>
#> </div>
#> 
#> $tabs
#> $tabs[[1]]
#> <div class="ui tab bottom attached segment" data-title="Summary" data-tab="Summary">
#>   <pre class="shiny-text-output noplaceholder" id="summary"></pre>
#> </div>
#> 
#> $tabs[[2]]
#> <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"