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

Make navbar toggler automatically collapse on tab selection #969

Open
ideusoes opened this issue Jan 22, 2024 · 0 comments
Open

Make navbar toggler automatically collapse on tab selection #969

ideusoes opened this issue Jan 22, 2024 · 0 comments

Comments

@ideusoes
Copy link

ideusoes commented Jan 22, 2024

When using page_navbar with a collection of nav_panels on mobile (I think breakpoint is 992px), the navbar switches to a toggler.
I would expect the toggler to automatically collapse when selecting a new nav_panel, however it does not.
Am I missing something or is it normal behaviour ? In the latter case, could you add a feature for this ?

Thanks for your help on this topic !

Code :

library(bslib)

ui <- page_navbar(
    title = "My app",
    nav_spacer(),
    nav_panel("Page 1", h1("Page 1")),
    nav_panel("Page 2", h1("Page 2")),
    nav_spacer(),
    collapsible = TRUE,
    fluid = TRUE
)
server <- function(input, output, session) {
}

shinyApp(ui = ui, server = server)
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