RinteRface/bs4Dash

Remove/Hide Controlbar Header Icon

jmestret opened this issue · 0 comments

Hi,

Thank you for the wonderful package! I have a question regarding the controlbar feature. Is there a way to hide the icon to toggle the controlbar from the header? I would like to add a custom button somewhere else in the UI to toggle the controlbar instead.

I would like to hide this button but still use the controlbar with another custom button:

image

Thanks!

library(shiny)
library(bs4Dash)

shinyApp(
  ui = dashboardPage(
    header = dashboardHeader(),
    sidebar = dashboardSidebar(),
    body = dashboardBody(
      actionButton(inputId = "controlbarToggle", label = "Toggle Controlbar")
    ),
    controlbar = dashboardControlbar(
      id = "controlbar",
      collapsed = FALSE,
      overlay = TRUE
    )
  ),
  server = function(input, output, session) {
    observeEvent(input$controlbarToggle, {
      updateControlbar(id = "controlbar", session = session)
    })
  }
)