Hi,
Here is my first attempt:
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Title of App"),
dashboardSidebar(width = 220,
sidebarMenu(id = "tabs",style = "position:fixed;width:220px;",
menuItem(style = "position:fixed;width: inherit;",
selectInput("n", "N", choices = c(50, 100, 150, 200))
))),
dashboardBody(
plotOutput('plot'),
plotOutput('plot1'),
plotOutput('plot2')
)
)
server <- function(input, output, session) {
output$plot <- renderPlot({
hist(runif(input$n), main = "Clearly known the selected N value")
})
output$plot1 <- renderPlot({
hist(runif(input$n), main = "hardly known the selected N value")
})
output$plot2 <- renderPlot({
hist(runif(input$n), main = "Never know the selected N value")
})
}
shinyApp(ui = ui, server = server)
It works, though I'm not very happy with the way I got there 
- You need to set the style of the sideBarMenu to
position:fixed;width:220px;
- Then you set the style of each menuItem to
position:fixed;width:inherit;
- I feel that sideBarMenu should be able to inherit its width as well from dashboardSidebar, but that doesn't work so you have to specify the width in both the dashboardSidebar and sideBarMenu. If you don't the width will be all messed up...
I'm sure there's a more elegant solution, but at least this works for now 
PJ