accordion | R Documentation |
In accordion you may display a list of elements that can be hidden or shown with one click.
accordion(
accordion_list,
fluid = TRUE,
active_title = "",
styled = TRUE,
custom_style = ""
)
accordion_list |
list with lists with fields: 'title' and 'content' |
fluid |
if accordion is fluid then it takes width of parent div |
active_title |
if active title matches 'title' from |
styled |
if switched of then raw style (no boxes) is used |
custom_style |
character with custom style added to CSS of accordion (advanced use) |
shiny tag list with accordion UI
if (interactive()) {
library(shiny)
library(shiny.semantic)
accordion_content <- list(
list(title = "AA", content = h2("a a a a")),
list(title = "BB", content = p("b b b b"))
)
shinyApp(
ui = semanticPage(
accordion(accordion_content, fluid = F, active_title = "AA",
custom_style = "background: #babade;")
),
server = function(input, output) {}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.