Learn R Programming

semantic.dashboard (version 0.2.1)

menu_item: Create a menu item.

Description

Create a menu item corresponding to a tab.

Usage

menu_item(
  text,
  ...,
  icon = NULL,
  tabName = NULL,
  href = NULL,
  newtab = TRUE,
  selected = FALSE
)

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

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

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?

selected

If TRUE, this menuItem will start selected.

Value

A menu item that can be passed sidebarMenu

Functions

  • menuItem: Create a menu item (alias for manu_item for compatibility with shinydashboard)

  • menuSubItem: Create a menu item (alias for manu_item for compatibility with shinydashboard)

Examples

Run this code
# NOT RUN {
menuItem(tabName = "plot_tab", text = "My plot", icon = icon("home"))
# }

Run the code above in your browser using DataLab