Search code examples
rshinydashboard

Hide totally the sidebar when pressing the toggle button in shiny dashboard


Is there any way to hide totally the sidebar when pressing the toggle button at the top of the dashboard? Right now a a part of the sidebar remains.

#app.r
library(shiny)
library(shinyWidgets)
library(shinydashboard)
library(shinydashboardPlus)

shinyApp(
  ui = dashboardPagePlus(
    header = dashboardHeaderPlus(

    ),
    sidebar = dashboardSidebar(),
    body = dashboardBody(
    ),
    rightsidebar = rightSidebar(),
    title = "DashboardPage"
  ),
  server = function(input, output) { }
)

Solution

  • You can add sidebar_fullCollapse=TRUE in to the dashboardPagePlus command to fully collapse it