Create an AdminLTE 2 controlbar menu
controlbarMenu(..., id = NULL, selected = NULL, position = NULL)
... |
|
---|---|
id | If provided, you can use |
selected | The |
position | This argument is deprecated; it has been discontinued in Bootstrap 3. |
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 )) }) } ) }