menu_item: Create a menu item.

Description Usage Arguments Value Functions Examples

View source: R/menu_item.R

Description

Create a menu item corresponding to a tab.

Usage

1
2
3
4
5
menu_item(text, ..., icon = NULL, tabName = NULL, href = NULL, newtab = TRUE)

menuItem(text, ..., icon = NULL, tabName = NULL, href = NULL, newtab = TRUE)

menuSubItem(text, ..., icon = NULL, tabName = NULL, href = NULL, newtab = TRUE)

Arguments

text

Text to show for the menu item.

...

This may consist of menuSubItems.

icon

Icon of the menu item. (Optional)

tabName

Id of the tab. Not compatible with href.

href

A link address. Not compatible with tabName.

newtab

If href is supplied, should the link open in a new browser tab?

Value

A menu item that can be passed sidebarMenu

Functions

Examples

1
menuItem(tabName = "plot_tab", text = "My plot", icon = icon("home"))

Example output

Attaching package:semantic.dashboardThe following object is masked frompackage:graphics:

    box

<a class="item" href="#shiny-tab-plot_tab" data-tab="shiny-tab-plot_tab" data-toggle="tab" data-value="plot_tab">
  <i class="home icon"></i>
  My plot
</a>

semantic.dashboard documentation built on Jan. 16, 2021, 5:28 p.m.