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

dashboardSidebar width argument unresponsive #329

Open
echoplaza opened this issue Dec 21, 2022 · 2 comments
Open

dashboardSidebar width argument unresponsive #329

echoplaza opened this issue Dec 21, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@echoplaza
Copy link

The width of the sidebar doesn't respond to changes in the width argument.

library(shiny)
library(bs4Dash)

shinyApp(
  ui = dashboardPage(
    title = "Basic Dashboard",
    header = dashboardHeader(),
    sidebar = dashboardSidebar(width = 800, sidebarMenu( 
      id = "tabs",
      sidebarHeader("Header 1"),
      menuItem(text = "Previous Mid", startExpanded = FALSE,
               radioButtons(inputId = "open_to_previous_mid", label =  "Here is a very very long label: Open relative to previous day's closing mid", 
                            choices = c("Any", "Above", "Below")
               )
      )
    )),
    controlbar = dashboardControlbar(),
    footer = dashboardFooter(),
    body = dashboardBody()
  ),
  server = function(input, output) {

  }
)
@ugurdar
Copy link

ugurdar commented Jan 20, 2023

You can use " , like this width = "800"

or
you can use fresh package, add this into dashboardBody() function

use_theme(create_theme(
            bs4dash_layout(
                 sidebar_width = "800px",
            )
        ))

@calderonsamuel
Copy link

I was searching for the same thing applied to the control bar. So, I'm just to documenting that @ugurdar response works for the controlbar too. e.g.

fresh::create_theme(
    fresh::bs4dash_layout(
        control_sidebar_width = "350px" 
    )
)

@DivadNojnarg DivadNojnarg added the bug Something isn't working label Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants