Expansion panel
Examples
loading...Web Component
Chi Vue
Props
JavaScript
Actions
You can bind actions to activators inside the expansion panel with the data-chi-epanel-action
attribute.
Action | Description |
---|---|
pending | Sets the panel to the pending state. All the contents under the -active--only and the -done--only will not be visible. |
active | Sets the panel to the active state. All the contents under the -active--only will be visible. |
toggle | In the case the panel is previously set to active, this action sets it to pending. It sets to active state otherwise. |
done | Sets the panel to the done state. All the contents under the -done--only will be visible. |
disabled | Sets the panel to the disabled state. All the contents under the -active--only and the -done--only will not be visible, and the title will render in a soft grey color. |
inactive | Is a synonym for pending . |
next | Sets the next panel in active status. |
previous | Sets the previous panel in active status. |
You can freely add, remove or change the data-chi-epanel-action
attribute on the fly, as is the main element with the chi-epanel
class, the one which listens for the events.
Preventing memory leaks
Expansion panel components have a dispose function to free all 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 expansionPanel
method more than once, as it will return any previously created expansion panel component associated to the element.
Accessibility
Accessibility guidelines coming soon