Create a Boostrap 4 dashboard main sidebar menu
Build an adminLTE3 dashboard main sidebar menu
bs4SidebarMenu( ..., id = NULL, flat = FALSE, compact = FALSE, child_indent = TRUE ) sidebarMenu(..., id = NULL, flat = FALSE, compact = FALSE, child_indent = TRUE)
... |
Slot for bs4SidebarMenuItem or bs4SidebarHeader. |
id |
For bs4SidebarMenu, if |
flat |
Whether sidebar items should have a flat design. FALSE by default. |
compact |
Whether items should be compacted. FALSE by default. |
child_indent |
Whether to indent children. TRUE by default |
David Granjon, dgranjon@ymail.com
if (interactive()) { library(shiny) library(bs4Dash) shinyApp( ui = bs4DashPage( sidebar_collapsed = TRUE, controlbar_collapsed = TRUE, enable_preloader = FALSE, loading_duration = 2, navbar = bs4DashNavbar(skin = "light"), body = bs4DashBody( ), sidebar = bs4DashSidebar( skin = "light", bs4SidebarMenu( id = "test", bs4SidebarMenuItem( tabName = "tab1", text = "Tab 1" ), bs4SidebarMenuItem( tabName = "tab2", text = "Tab 2" ), bs4SidebarMenuItem( text = "Click me pleaaaaase", bs4SidebarMenuSubItem( tabName = "subtab1", text = "Tab 3" ),bs4SidebarMenuSubItem( tabName = "subtab2", text = "Tab 4" ) ) ) ), controlbar = bs4DashControlbar(skin = "light"), footer = bs4DashFooter() ), server = function(input, output, session) { observeEvent(input$test, { if (input$test == "subtab1") { showModal(modalDialog( title = "Thank you so much", "You clicked me! This event is the result of an input bound to the menu. By adding an id to the bs4SidebarMenu, input$id will give the currently selected tab. This is useful to trigger some events.", easyClose = TRUE, footer = NULL )) } }) } ) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.