Accordion
Build vertically collapsing accordions in combination with our Collapse JavaScript plugin.
Last updated
Was this helpful?
Build vertically collapsing accordions in combination with our Collapse JavaScript plugin.
Last updated
Was this helpful?
The Accordion component takes a variety of properties to customize its appearance and content:
title
: The title of the accordion.
title_tag
: The HTML tag to use for the title. Default is h2
.
title_link
: A link to wrap the title in.
items
(required): An array of items to display in the accordion.
accordion_item_utility_classes
: An array of utility classes to apply to each accordion item.
accordion_utility_classes
: An array of classes to apply to the accordion.
flush
: A boolean to determine if the accordion should have flush borders.
open_item_id
: The id of the item to be open by default.
id
: The id of the accordion.
stay_open
: A boolean to determine if an accordion item should stay open when another item is opened. Default is false
.
Example 1: Simple Accordion usage
Example 2: Advanced usage of Accordion usage in Views of FAQ node teaser view mode by overriding the related views-view--unformatted
template: