Wrap one or more accordion items into a container

accordion(..., id, style = c("default", "1", "2", "3", "4"), uncollapsed = 1)

Arguments

...

The accordionItem elements to include within the body of the particular accordion

id

The identification of the accordion

style

Style of the accordion, use "default", "1", "2", "3", "4"

uncollapsed

Indicate by number which accordionItem should not be collapsed

Value

HTML of a container with a class called accordion

Examples

# \donttest{
if(FALSE){

# Example 1

  library(shiny)
  library(nextGenShinyApps)

  shiny::shinyApp(
    ui = fluidPage(
      style = "8",
      custom.bg.color = "#d9d9d9",
      sidebar = NULL,
      header = titlePanel(left="Sample Ex1"),
      accordion(
        id = "accordion5",
        style = "4",
        accordionItem(
          title = "Accordion 1",
          "Massa sed elementum sus"
        ),
        accordionItem(
          title = "Accordion 2",
          "Auctor neque etiam non."
        )
      )
    ),
    server = function(input, output) {
    }
  )


# Example 2

  library(shiny)
  library(nextGenShinyApps)

  shiny::shinyApp(
    ui = fluidPage(
      style = "8",
      custom.bg.color = "#f7c4bb",
      sidebar = NULL,
      header = titlePanel(left="Sample Ex2"),
      accordion(
        id = "accordion5",
        style = "1",
        accordionItem(
          title = "Accordion A",
          icon = shiny::icon("trash"),
          "Massa sed elementum sus"
        ),
        accordionItem(
          title = "Accordion B",
          icon = shiny::icon("edit"),
          "Auctor neque etiam non."
        )
      )
    ),
    server = function(input, output) {
    }
  )


}

# }