<hx-accordion> v0.4.0+ HelixUI v0.4.0 or later required

Modes

multi-panel
When the current-panel attribute is absent, any number of panels may be opened at the same time.
single-panel
When the current-panel attribute is set, only one panel may be open at a time.

Methods

selectNext()
Opens the next sibling panel.
Requires the current-panel attribute to be present.
selectPrevious()
Opens the previous sibling panel.
Requires the current-panel attribute to be present.

Attributes

Attributes enable declarative configuration of an element, via HTML markup.

current-panel {Number} (optional)
Zero-based index of the panel you wish to open. For example, a value of "0" will open the first panel, "1" will open the second, etc.). If omitted, any number of panels can be opened at once.

Properties

JavaScript properties enable programmatic access to an element's configuration and state.

currentPanel {Number}
Manipulates the current-panel attribute
panels {Array<Element>} read-only
Returns an array of live <hx-accordion-panel> elements.

See Also