Learn R Programming

shinyGovstyle (version 0.1.0)

accordion: Accordion Function

Description

This function inserts a accordion

Usage

accordion(inputId, titles, descriptions)

Value

an accordion html shiny object

Arguments

inputId

Input id for the accordion

titles

Add the titles for the accordion

descriptions

Add the main text for the accordion

Examples

Run this code
if (interactive()) {

  ui <- fluidPage(
    shinyGovstyle::header(
      main_text = "Example",
      secondary_text = "User Examples",
      logo="shinyGovstyle/images/moj_logo.png"),
    shinyGovstyle::banner(
      inputId = "banner", type = "beta", 'This is a new service'),
    shinyGovstyle::gov_layout(size = "two-thirds",
    accordion(
      "acc1",
      c("Writing well for the web",
        "Writing well for specialists",
        "Know your audience",
        "How people read"
       ),
      c("This is the content for Writing well for the web.",
        "This is the content for Writing well for specialists.",
        "This is the content for Know your audience.",
        "This is the content for How people read."
       ))),

    shinyGovstyle::footer(full = TRUE)
  )

  server <- function(input, output, session) {}

  shinyApp(ui = ui, server = server)
}

Run the code above in your browser using DataLab