rstudio / bslib

Tools for theming Shiny and R Markdown via Bootstrap 3, 4, or 5.
https://rstudio.github.io/bslib/
Other
443 stars 49 forks source link

When `nav_menu()` is in a `navset_card_pill(placement="below")`, the menu should open upwards instead of downwards #1069

Closed daattali closed 1 month ago

daattali commented 1 month ago

Otherwise opening a menu goes below the card itself

image

Example code taken from the docs:

link_shiny <- tags$a(shiny::icon("github"), "Shiny", href = "https://github.com/rstudio/shiny", target = "_blank")
link_posit <- tags$a(shiny::icon("r-project"), "Posit", href = "https://posit.co", target = "_blank")

navset_card_pill(
    placement = "below",
    nav_panel(title = "One", p("First tab content.")),
    nav_panel(title = "Two", p("Second tab content.")),
    nav_panel(title = "Three", p("Third tab content")),
    nav_spacer(),
    nav_menu(
        title = "Links",
        nav_item(link_shiny),
        nav_item(link_posit)
    )
)
gadenbuie commented 1 month ago

Thanks for reporting @daattali. We have a ticket for this in #545.