Skip to content

menuitems in sidebar should be collapsible #172

Description

@mattapel

Great package! Unfortunately it is not yet possible to have collapsible menuItems in the sidebar as in shinydashboard

`library(shiny)
library(shinydashboard) # <-- Change this line to: library(semantic.dashboard)

ui <- dashboardPage(
dashboardHeader(title = "Basic dashboard"),
dashboardSidebar(sidebarMenu(
menuItem(tabName = "home", text = "Home", icon = icon("home"),
menuItem(tabName = "another", text = "Another Tab", icon = icon("heart"))) # <--- collapsible menuItem only in shinydashboard
)),
dashboardBody(
fluidRow(
box(plotOutput("plot1", height = 250)),
box(
title = "Controls",
sliderInput("slider", "Number of observations:", 1, 100, 50)
)
)
)
)

server <- function(input, output) {
set.seed(122)
histdata <- rnorm(500)
output$plot1 <- renderPlot({
data <- histdata[seq_len(input$slider)]
hist(data)
})
}

shinyApp(ui, server)`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions