Properties
| Name | Attribute | Type | Description |
|---|---|---|---|
| position | position | |
The position to stack toasts |
| reverse | reverse | |
Reverse the order of toast with newest toasts showed on top of the stack. By default newest toasts are showed at the bottom of the stack. |
| dir | dir | |
Used to set the base direction of text for display |
| lang | lang | |
Used to identify the language of text content on the web |
Instance Functions
| Name | Parameters | Returns | Description |
|---|---|---|---|
| showToast | |
|
Push a toast message onto the toast stack. |
| showInstance | |
|
Push an existing toast instance onto the toast stack. |
Static Functions
| Name | Parameters | Returns | Description |
|---|---|---|---|
| create | |
|
Creates a new <omni-toast-stack> element with the provided context and appends it to the DOM (either to document body or to provided target parent element). |
Supported Global Attributes
| Attribute | Type | Description |
|---|---|---|
|
|
Duration milliseconds that a slotted toast must be shown in the stack before it is removed. |
Events
| Name | Type | Description |
|---|---|---|
| toast-remove | |
Dispatched when the a toast is removed from the stack. |
| toast-stack-remove | |
Dispatched from a toast when it is removed from the stack. |
Types
| Name | Type |
|---|---|
| ToastStackInit | |
| ShowToastInit | |
| ShowToastOptions | |
Slots
| Name | Description |
|---|---|
|
Used to define content that is displayed while async rendering is awaiting, or when renderLoading() is implicitly called |
|
Toast(s) to be displayed |
Theme Variables
| Name | Description |
|---|---|
|
Theme primary color. |
|
Theme primary hover color. |
|
Theme primary active color. |
|
Theme accent color. |
|
Theme accent hover color. |
|
Theme accent active color. |
|
Theme background color. |
|
Theme background hover color. |
|
Theme background active color. |
|
Theme font color. |
|
Theme disabled border color. |
|
Theme disabled background color. |
|
Theme disabled background color. |
|
Theme error border color. |
|
Theme hint font color. |
|
Theme inactive color. |
|
Theme inactive color. |
|
Theme font family. |
|
Theme font size. |
|
Theme font weight. |
|
Theme border radius. |
|
Theme border width. |
|
Theme box shadow. |
Component Variables
| Name | Description |
|---|---|
|
The z-index of the stack. |
|
The font color applied to the stack. |
|
The position from the bottom toast position is set to bottom, bottom-left, or bottom-right. |
|
The position from the bottom toast position is set to top, top-left, or top-right. |
|
The position from the bottom toast position is set to left, top-left, or bottom-left. |
|
The position from the bottom toast position is set to right, top-right, or bottom-right. |
|
The vertical gap between toast elements in the stack. |