ECollapse Collapse
Examples
Before-change validation and custom content
Collapse
Properties
accordionboolAccordion mode allowing at most one expanded node or collapse item at a level.
falseactiveNamesvarExpanded collapse item names; accordion mode keeps at most one.
[]beforeCollapsevarGuard before changing collapse state, returning a boolean or Promise.
nullcontentDelegateComponentComponent slot for custom body content; null uses the default content. See this page’s examples for delegate context.
nullenabledboolAllow interaction; false disables the control.
trueexpandIconPositionstringPosition of the collapse icon relative to the title.
"left" / "right"
"right"heightrealComponent size in pixels; may be bound to its parent layout.
implicitHeighticonDelegateComponentComponent slot for custom icon; null uses the default content. See this page’s examples for delegate context.
nullmodelvarArray of collapse panel data.
Fields:
name, title, content
disabled, icon, titleDelegate
iconDelegate, contentDelegate
[]pendingNamesvarNames of items awaiting asynchronous collapse guards.
[]titleDelegateComponentComponent slot for custom title; null uses the default content. See this page’s examples for delegate context.
nullvisibleboolWhether the component is visible.
truewidthrealComponent size in pixels; may be bound to its parent layout.
implicitWidthSignals
changed(var names)Emitted when expanded panels change; names contains the expanded panel names.
Methods
isExpanded(name)Return whether the specified item is expanded.
setActiveNames(names)Set the names of the expanded panels.
toggle(name)Toggle the expanded or selected state; pass the target identifier when required.