Shinydashboardplus:如何添加没有标题的框?

Shinydahsboardplus: how to add box without a title?

最近更新 ShinydasboardPlus(到 2.0)后,我无法在没有 header 和没有 space 的情况下制作 box header.

我尝试了 title = NULL, headerBorder = FALSE,但仍然有这个 space。如何摆脱它?我想要一个只有内容的盒子,没有 header,没有 header 的 space。

谢谢!

示例:

library(shiny)
library(shinydashboard)
library(shinydashboardPlus)
ui <- dashboardPage(
  title = "Box API",
  dashboardHeader(),
  dashboardSidebar(),
  dashboardBody(
    box(
      title = NULL,
      headerBorder = FALSE,
      "Box body")
  )
)

server <- function(input, output, session) {
}

shinyApp(ui, server)

可以使用css不显示header。像这样:

ui <- dashboardPage(
  title = "Box API",
  dashboardHeader(),
  dashboardSidebar(),
  dashboardBody(
    box(
      id = 'foo',  # use an id to only select this box
      title = NULL,
      headerBorder = FALSE,
      "Box body"
    ),
    tags$head(tags$style('#foo .box-header{ display: none}'))  # target the box header of foo
  )
)