packages/ecl/components/ecl-accordion/ecl-accordion-item.component.ts
Represents an individual item within an ECL Accordion. This component allows for expand/collapse behavior and emits toggle events on interaction.
| changeDetection | ChangeDetectionStrategy.OnPush |
| HostDirectives |
ECLBaseDirective
|
| selector | ecl-accordion-item |
| imports |
CommonModule
EUI_ECL_ICON
TranslateModule
|
| styles |
:host {
display: block;
}
|
| templateUrl | ./ecl-accordion-item.component.html |
Properties |
Methods |
Inputs |
Outputs |
HostBindings |
Accessors |
| isExpanded |
Type : boolean
|
Default value : false
|
|
Whether the accordion item is expanded by default. Can be controlled externally. |
| label |
Type : string
|
|
The label for the accordion header. This value is displayed as the clickable title of the item. |
| toggle |
Type : EventEmitter
|
|
Event emitted when the item is toggled (expanded/collapsed). The emitted value contains the next expanded state. |
| class |
Type : string
|
| onItemClick | ||||||||
onItemClick(evt: MouseEvent)
|
||||||||
|
Handles click on the accordion item header. Toggles the item and emits a toggle event. If the event is not prevented, the item's state is updated.
Parameters :
Returns :
void
|
| baseDirective |
Type : unknown
|
Default value : inject(ECLBaseDirective)
|
| contentId |
Type : string
|
Default value : ''
|
| titleId |
Type : string
|
Default value : ''
|
| cssClasses |
getcssClasses()
|