Farhad
Farhad

Reputation: 148

How to completely collapse sidebar in bs4Dash

I need to fully (not partially) collapse the main sidebar (left) in my app with toggle button. I noticed there is an argument: sidebar_fullCollapse in shinydashboardPlus, that if set to TRUE will collapse the sidebar completely. However, we do not have this parameter in bs4DashPage. Any help would be highly appreciated.

library(shiny)
library(bs4Dash)

shinyApp(
  ui = bs4DashPage(
    header = dashboardHeader(),
    body = dashboardBody(),
    sidebar = dashboardSidebar()
  ),
  server = function(input, output, session) {}
)

enter image description here

Upvotes: 1

Views: 534

Answers (2)

Farhad
Farhad

Reputation: 148

Here is a sample picture which shows that the sidebar is completely collapsed.

enter image description here

Upvotes: 1

Farhad
Farhad

Reputation: 148

I just found the answer to this question. There is a parameter in bs4DashPage by the name of minified. Setting this parameter to FALSE will collapse the sidebar completely.

library(shiny)
library(bs4Dash)

shinyApp(
  ui = bs4DashPage(
    header = dashboardHeader(),
    body = dashboardBody(),
    sidebar = dashboardSidebar(
      minified = F
    )
  ),
  server = function(input, output, session) {}
)

Upvotes: 2

Related Questions