### File

`packages/ecl/components/ecl-modal/ecl-modal-header.component.ts`

### Description

Header component used within the ECL Modal.

Displays an icon depending on the modal variant, user-defined content, and a close button that emits a close event.

### Extends

`ECLBaseDirective`

### Metadata

selector | `[eclModalHeader]`
imports | `EUI_ECL_ICON` `TranslateModule` `EUI_ECL_BUTTON`
templateUrl | `./ecl-modal-header.component.html`

### Index

###### Properties
closeButton eclThemeService variant
###### Methods
getIcon onCloseClick getCssClasses
###### Inputs
class e2eAttr tabindex
###### Outputs
modalClose
###### HostBindings
class
###### Accessors
cssClasses

### Inputs

class
Type : `string`

e2eAttr
Type : `any`

tabindex
Type : `number`

### Outputs

modalClose
Type : `EclModalCloseEvent<T>`
Event emitted when the close button is clicked. Emits an `EclModalCloseEvent` object.

### HostBindings

class
Type : `string`
Applies the ECL CSS class for modal header container.

### Methods

getIcon
`getIcon()`
Returns the name of the icon associated with the current variant. Returns : `"information" | "check-filled" | "warning" | "error" | null` The icon name, or `null` if no matching variant exists.

onCloseClick
`onCloseClick()`
Handles the click event on the close button. Emits a `modalClose` event with no payload. Returns : `void`

getCssClasses
`getCssClasses(rootClass: string)`
Parameters :
Name | Type | Optional
rootClass | `string` | No
Returns : `string`

### Properties

closeButton
Type : `unknown`
Default value : `viewChild.required<EclButtonComponent>('closeButton')`
Reference to the close button component.

eclThemeService
Type : `unknown`
Default value : `inject(EclThemeService)`

variant
Type : `unknown`
Default value : `signal<'information' | 'success' | 'warning' | 'error' | string>(undefined)`
Defines the visual variant of the modal. Determines which icon is shown in the header. Possible values: 'information', 'success', 'warning', 'error', or any custom string.

### Accessors

cssClasses
get `cssClasses()`
Applies the ECL CSS class for modal header container. Returns : `string`

# results matching ""

# No results matching ""