### File

`packages/components/eui-alert/eui-alert.component.ts`

### Description

Alert displays a short, important message to attract the user's attention without interrupting its task.

### Implements

`OnInit`

### Metadata

changeDetection | `ChangeDetectionStrategy.OnPush`
HostDirectives | `BaseStatesDirective` Inputs : euiSuccess euiInfo euiWarning euiDanger euiVariant
selector | `div[euiAlert], eui-alert`
imports | `NgTemplateOutlet` `EUI_ICON_BUTTON` `EUI_ICON_STATE`
templateUrl | `./eui-alert.component.html`
styleUrl | `./eui-alert.scss`

### Index

###### Properties
alertIconFillColor alertIconType alertTitle baseStatesDirective role
###### Methods
onCloseClick
###### Inputs
ariaDescribedBy e2eAttr isBordered isCloseable isFocusable isMuted isVisible
###### Outputs
closeAlert
###### HostBindings
attr.role attr.tabindex class
###### Accessors
cssClasses ariaDescribedBy tabindex

### Inputs

ariaDescribedBy
Type : `string`
Sets the `aria-describedby` attribute for the host element.

e2eAttr
Type : `string`
Default value : `'eui-alert'`
Sets the `data-e2e` attribute for the host element. Default: `eui-alert`.

isBordered
Type : `boolean`
Default value : `false`
Removes the left border and icon from the alert.

isCloseable
Type : `boolean`
Default value : `false`
Allows the alert to be closed by the user.

isFocusable
Type : `boolean`
Default value : `false`
Allows the alert to be focused by the user.

isMuted
Type : `boolean`
Default value : `false`
Removes the left border and icon from the alert.

isVisible
Type : `boolean`
Default value : `true`
Controls the visibility of the alert. Default: true

### Outputs

closeAlert
Type : `EventEmitter`
Event emitted when the alert is closed.

### HostBindings

attr.role
Type : `string`
Default value : `'alert'`
Sets the `role` attribute for the host element.

attr.tabindex
Type : `string`
Sets the `tabindex` attribute for the host element.

class
Type : `string`

### Methods

onCloseClick
`onCloseClick()`
Hide the alert and emits the `closeAlert` event when the close button is clicked. Returns : `void`

### Properties

alertIconFillColor
It is not being used in the component.
Type : `string`

alertIconType
It is not being used in the component.
Type : `string`

alertTitle
Type : `QueryList<EuiAlertTitleComponent>`
Decorators : `@ContentChild(undefined, {static: false})`
Content for the alert title given by `<eui-alert-title>`.

baseStatesDirective
Default value : `inject(BaseStatesDirective)`

role
Type : `string`
Default value : `'alert'`
Decorators : `@HostBinding('attr.role')`
Sets the `role` attribute for the host element.

### Accessors

cssClasses
get `cssClasses()`
Computes and returns the CSS classes for the component based on its current state. Returns : `string`

ariaDescribedBy
get `ariaDescribedBy()`
Sets the `aria-describedby` attribute for the host element. Returns : `string`

tabindex
get `tabindex()`
Sets the `tabindex` attribute for the host element. Returns : `string`

# results matching ""

# No results matching ""