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

Art*_*Art 3 r shiny shinydashboard shinydashboardplus

最近更新ShinydasboardPlus(至 2.0)后,我无法box在没有标题和没有标题空间的情况下进行制作。

我试过了title = NULL, headerBorder = FALSE,仍然有这个空间。如何摆脱它?我想要一个只有内容的盒子,没有标题,没有标题空间。 在此输入图像描述

谢谢!

例子:

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)
Run Code Online (Sandbox Code Playgroud)

bob*_*bel 6

您可以使用css不显示标题。像这样的东西:

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
  )
)
Run Code Online (Sandbox Code Playgroud)