Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove/Hide Controlbar Header Icon #376

Open
jmestret opened this issue May 28, 2024 · 0 comments
Open

Remove/Hide Controlbar Header Icon #376

jmestret opened this issue May 28, 2024 · 0 comments

Comments

@jmestret
Copy link

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)
    })
  }
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant