# NOT RUN {
if(interactive()){
 library(shiny)
 library(bs4Dash)
 shiny::shinyApp(
   ui = bs4DashPage(
    navbar = bs4DashNavbar(),
    sidebar = bs4DashSidebar(),
    controlbar = bs4DashControlbar(),
    footer = bs4DashFooter(),
    title = "test",
    body = bs4DashBody(
    fluidRow(
     column(
      width = 6,
      bs4Card(
       title = "Closable Box with dropdown", 
       closable = TRUE, 
       width = 12,
       status = "warning", 
       solidHeader = FALSE, 
       collapsible = TRUE,
       labelText = 1,
       labelStatus = "danger",
       labelTooltip = "Hi Bro!",
       dropdownIcon = "wrench",
       dropdownMenu = dropdownItemList(
         dropdownItem(url = "http://www.google.com", name = "Link to google"),
         dropdownItem(url = "#", name = "item 2"),
         dropdownDivider(),
         dropdownItem(url = "#", name = "item 3")
       ),
       p("Box Content")
      )
     ),
     column(
      width = 6, 
      bs4Card(
       title = "Closable Box with gradient", 
       closable = TRUE, 
       width = 12,
       status = "warning", 
       solidHeader = FALSE, 
       gradientColor = "success",
       collapsible = TRUE,
       p("Box Content")
      )
     )
     ),
     fluidRow(
      bs4Card(
       title = "Closable Box with solidHeader", 
       closable = TRUE, 
       width = 6,
       solidHeader = TRUE, 
       status = "primary",
       collapsible = TRUE,
       p("Box Content")
      ),
      bs4Card(
       title = "Maximizable Card", 
       width = 6,
       status = "warning", 
       closable = FALSE,
       maximizable = TRUE, 
       collapsible = FALSE,
       sliderInput("obs", "Number of observations:",
                   min = 0, max = 1000, value = 500
       ),
       plotOutput("distPlot")
      )
     )
    )
   ),
   server = function(input, output) {
    output$distPlot <- renderPlot({
     hist(rnorm(input$obs))
    })
   }
 )
}
# }
Run the code above in your browser using DataLab