0

How can I totally delete the toggle button that hides and display sidebar in shiny dashboard?

## app.R ##
library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(),
  dashboardSidebar(
    collapsed = T
  ),
  dashboardBody(

    
  )
)

server <- function(input, output) { }

shinyApp(ui, server)
Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225
firmo23
  • 7,490
  • 2
  • 38
  • 114

1 Answers1

1
library(shiny)
library(shinydashboard)

css <- ".sidebar-toggle {display: none;}"

ui <- dashboardPage(
  dashboardHeader(),
  dashboardSidebar(
    collapsed = T
  ),
  dashboardBody(
    tags$head(tags$style(HTML(css)))
    
  )
)

server <- function(input, output) { }

shinyApp(ui, server)
Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225