### File

`packages/core/src/lib/services/growl/eui-growl.service.ts`

### Description

Centralized service for managing application-wide `eui-growl` notifications. Provides methods to display success, error, warning, and info messages with configurable behavior. Manages message lifecycle, positioning, and accessibility settings through reactive BehaviorSubjects. Supports both temporary auto-dismissing messages and persistent sticky notifications. Injected at root level, ensuring a single instance across the entire application.

### Index

###### Properties

- Readonly ariaGrowlLive
- Readonly growlCallback
- Readonly growlLife
- Readonly growlMessages
- Readonly growlPosition
- Readonly isCloseAllSticky
- Readonly isGrowlSticky

###### Methods

- clearGrowl
- growl
- growlError
- growlInfo
- growlSuccess
- growlWarning

### Methods

clearGrowl
`clearGrowl()`
Removes all currently displayed growl messages from the notification queue. Clears both sticky and temporary messages immediately. Returns : `void`

growl
`growl(msg: EuiGrowlMessage, isSticky?: boolean, isMultiple?: boolean, life?: number, position?: string, callback?: () => void, ariaLive?: "off" | "polite" | "assertive")`

Displays a growl notification message with customizable behavior and appearance. Validates message severity and manages message lifecycle through reactive streams. Danger severity messages default to sticky behavior unless explicitly configured.

Parameters :

Name | Type | Optional | Description

msg

`EuiGrowlMessage`

No

- Message object containing severity, summary, and detail properties

isSticky

`boolean`

Yes

- When true, message persists until manually dismissed; defaults to false except for danger messages

isMultiple

`boolean`

Yes

- When true, appends message to existing queue; when false, clears previous messages

life

`number`

Yes

- Duration in milliseconds before auto-dismissal; defaults to 3000ms

position

`string`

Yes

- Screen position for message display (e.g., 'bottom-right', 'top-center')

callback

`function`

Yes

- Optional function executed when message is clicked

ariaLive

`"off" | "polite" | "assertive"`

Yes

- ARIA live region politeness level for screen reader announcements

Returns : `void`

growlError
`growlError(msg: string, position?: string)`

Displays an error growl notification with predefined styling and behavior. Message is non-sticky but can be configured to persist based on severity handling.

Parameters :

Name | Type | Optional | Description

msg

`string`

No

- Detail text to display in the notification

position

`string`

Yes

- Optional screen position override; defaults to service-configured position

Returns : `void`

growlInfo
`growlInfo(msg: string, position?: string)`

Displays an informational growl notification with predefined styling and behavior. Message is non-sticky and auto-dismisses after the default duration.

Parameters :

Name | Type | Optional | Description

msg

`string`

No

- Detail text to display in the notification

position

`string`

Yes

- Optional screen position override; defaults to service-configured position

Returns : `void`

growlSuccess
`growlSuccess(msg: string, position?: string)`

Displays a success growl notification with predefined styling and behavior. Message is non-sticky and auto-dismisses after the default duration.

Parameters :

Name | Type | Optional | Description

msg

`string`

No

- Detail text to display in the notification

position

`string`

Yes

- Optional screen position override; defaults to service-configured position

Returns : `void`

growlWarning
`growlWarning(msg: string, position?: string)`

Displays a warning growl notification with predefined styling and behavior. Message is non-sticky and auto-dismisses after the default duration.

Parameters :

Name | Type | Optional | Description

msg

`string`

No

- Detail text to display in the notification

position

`string`

Yes

- Optional screen position override; defaults to service-configured position

Returns : `void`

### Properties

Readonly ariaGrowlLive
Type : `unknown`
Default value : `new BehaviorSubject<'off' | 'polite' | 'assertive'>('polite')`

Readonly growlCallback
Type : `unknown`
Default value : `new BehaviorSubject<(() => void) | null>(null)`

Readonly growlLife
Type : `unknown`
Default value : `new BehaviorSubject(3000)`

Readonly growlMessages
Type : `unknown`
Default value : `new BehaviorSubject<EuiGrowlMessage[]>([])`

Readonly growlPosition
Type : `unknown`
Default value : `new BehaviorSubject('bottom-right')`

Readonly isCloseAllSticky
Type : `unknown`
Default value : `new BehaviorSubject(false)`

Readonly isGrowlSticky
Type : `unknown`
Default value : `new BehaviorSubject(false)`

# results matching ""

# No results matching ""