Accordion
Examples
To render accordion, use the class chi-accordion
.
JavaScript
Methods
Method | Description | Returns |
---|---|---|
hide() => void | Hides the accordion or individual accordion item (if provided) | Type: void |
show() => void | Shows the accordion or individual accordion item (if provided) | Type: void |
toggle() => void | Toggles active state (show/hide) of the accordion or accordion item (if provided) | Type: void |
expandAll() => void | Expands all the accordion items | Type: void |
collapseAll() => void | Collapses all the accordion items | Type: void |
Preventing memory leaks
Accordion component has a dispose function to free all the resources attached to the element, such as event listeners and object data. You should call this method when you want to remove the component.
It is safe to call the accordion
method more than once, as it will return any previously created accordion component associated with the element.
Accessibility
Accessibility guidelines coming soon