RinteRface/bs4Dash

Collapable boxes

tkranenburg opened this issue · 2 comments

Dear bs4Dash developers,

Thanks for developing the bs4Dash package.
I have a question with regards to boxes and collapsing them.
When I use the boxes with the DashboardBody or DashboardPage, I can collapse the boxes. However, when I use the boxes in a normal shiny fluidPage, the collapse button does not appear to work. I am using the fluidPages as modules in a larger app.
Is it correct that the boxes are only collapsible within a DashboardBody/Page or am I overlooking something? Thanks in advance.

Kind regards,

Hi,

Theoretically, box is not supposed to work outside dashboardPage because the latter includes all necessary dependencies to make it work (JS, CSS, ...). However, {shinyWidgets} exposes useBs4Dash(): https://github.com/dreamRs/shinyWidgets/blob/c22f08105d6ac6ab047d8819376aa13ad67f2113/R/useBs4Dash.R, which allows to do it. See here for a thorough explanation: https://unleash-shiny.rinterface.com/htmltools-dependencies.html#htmldeps-import.

Hi Divad,

Thanks a lot for point me in the right direction!