powered by
Create a Bootstrap accordion
bs_accordion( id, items = list(), accordion_class = "accordion", item_class = "accordion-item", item_header_class = "accordion-header", button_class = "accordion-button", div_class = "accordion-collapse collapse", body_class = "accordion-body" )
A string, the id to use for the accordion, must be unique within a page (if you have multiple accordions on a page).
A named list, names become the label for each panel, values should be the HTML content to display when the panel is toggled.
A string, the class of the div wrapping the accordion content.
A string, the class of the div wrapping the accordion items.
A string, the class of the accordion panel headers.
A string, the class of the div wrapping the accordion panel header button items.
A string, the class of the div wrapping the accordion panel content.
A string, the class of the div wrapping the accordion panel content body.
A string of HTML.
# NOT RUN { bs_accordion( id = "acc1", items = list( "One" = p("Check it out."), "Two" = p("Does it work?"), "Three" = p("I hope so.") ) ) # }
Run the code above in your browser using DataLab