Create an AdminLTE 2 controlbar menu

controlbarMenu(..., id = NULL, selected = NULL, position = NULL)

Arguments

...

tabPanel() elements to include in the tabset

id

If provided, you can use input$id in your server logic to determine which of the current tabs is active. The value will correspond to the value argument that is passed to tabPanel().

selected

The value (or, if none was supplied, the title) of the tab that should be selected by default. If NULL, the first tab will be selected.

position

This argument is deprecated; it has been discontinued in Bootstrap 3.

Examples

if (interactive()) { library(shiny) library(shinydashboard) library(shinydashboardPlus) shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody(), controlbar = dashboardControlbar( id = "controlbar", controlbarMenu( id = "menu", controlbarItem( "Tab 1", "Welcome to tab 1" ), controlbarItem( "Tab 2", "Welcome to tab 2" ) ) ) ), server = function(input, output, session) { observeEvent(input$menu, { showModal(modalDialog( title = "Alert", sprintf(" %s is active", input$menu), easyClose = TRUE, footer = NULL )) }) } ) }