Search code examples
rshinybslib

Can bslib nested card fullscreen behavior show just the nested card?


When I use the option full_screen = TRUE with nested cards, clicking the fullscreen icon maximizes both cards. Can it be set to show just the internal card as fullscreen?

library(shiny)
library(bslib)

ui = page(
  card(
    full_screen = F,
    card_header(
      "Main card",
    ),
      card(
        full_screen = T,
        card_header(
          "Plot card"
        ),
        plotOutput("plot")
      # )
    )
  )
)

server = function(input, output)
{
  output$plot = renderPlot(hist(rnorm(100)))
}

shinyApp(ui, server)

Solution

  • The problem has been fixed in a newer version of bslib: https://github.com/rstudio/bslib/issues/558