This not exactly how I was thinking this sidebar to be used, but it is definitely possible. See below:
library(shiny)
library(shinydashboard)
library(leaflet)
map <- leaflet() %>% addTiles()
shinyApp(
ui = dashboardPagePlus(
dashboardHeaderPlus(),
dashboardSidebar(),
dashboardBody(
setShadow("box"),
fluidRow(
boxPlus(
title = "Closable Box with dropdown",
closable = TRUE,
status = "warning",
solidHeader = FALSE,
collapsible = TRUE,
enable_sidebar = TRUE,
sidebar_width = 25,
sidebar_start_open = TRUE,
sidebar_content = tagList(
checkboxInput("somevalue", "Some value", FALSE),
verbatimTextOutput("value")
),
map
)
)
)
),
server = function(input, output) {
output$value <- renderText({ input$somevalue })
}
)
When including an image in the box sidebar and to make sure it is correctly displayed, you have to add a style attribute to the img tag as follows: