Description Usage Arguments Author(s) Examples
View source: R/dashboardNavbar.R
Build an adminLTE3 dashboard dropdown menu
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | bs4DropdownMenu(
  ...,
  show = FALSE,
  labelText = NULL,
  src = NULL,
  status = c("primary", "warning", "danger", "info", "success"),
  menuIcon = "bell",
  align = "right"
)
dropdownMenu(
  ...,
  show = FALSE,
  labelText = NULL,
  src = NULL,
  status = c("primary", "warning", "danger", "info", "success"),
  menuIcon = "bell",
  align = "right"
)
 | 
| ... | Slot for bs4DropdownMenuItem. | 
| show | Whether to start with the dropdown open. FALSE by default. | 
| labelText | Dropdown label text. | 
| src | Dropdown link to an external ressource. | 
| status | Dropdown menu status. "primary", "success", "warning", "danger" or "info". | 
| menuIcon | Fontawesome icon (default = "bell") | 
| align | Menu alignment (default = "right") | 
David Granjon, dgranjon@ymail.com
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | if(interactive()){
 library(shiny)
 library(bs4Dash)
 
 shiny::shinyApp(
   ui = bs4DashPage(
     navbar = bs4DashNavbar(
      rightUi = bs4DropdownMenu(
       show = FALSE,
       status = "danger",
       src = "https://www.google.fr",
       bs4DropdownMenuItem(
         inputId = "triggerAction",
         message = "message 1",
         from = "Divad Nojnarg",
         src = "https://adminlte.io/themes/v3/dist/img/user3-128x128.jpg",
         time = "today",
         status = "danger",
         type = "message"
       ),
       bs4DropdownMenuItem(
         message = "message 2",
         from = "Nono Gueye",
         src = "https://adminlte.io/themes/v3/dist/img/user3-128x128.jpg",
         time = "yesterday",
         status = "success",
         type = "message"
       )
      )
     ),
     sidebar = bs4DashSidebar(),
     controlbar = bs4DashControlbar(),
     footer = bs4DashFooter(),
     title = "test",
     body = bs4DashBody()
   ),
   server = function(input, output) {
    observeEvent(input$triggerAction, {
     showModal(modalDialog(
      title = "Important message",
      "This is an important message!"
     ))
    })
   }
 )
}
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.