Skip to main content

<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 allow you to configure an element in a declarative manner via markup.

current-panel {Number} (optional)
(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

Properties allow you to configure an element in an imperative manner via JavaScript.

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

See Also