Name | Type | Default | Description |
AppendTo | string | "null" | Specifies the container where new openned toast items will be displayed. The value can be an HTMLElement or element's id. This property is in relation with modal(lower priority than modal) and position(higher priority than position) properties. |
AutoClose | bool | false | Sets or gets whether the toast will automatically close after duration equal to the autoCloseDelay property. |
AutoCloseDelay | int | 3000 | Sets or gets the duration after which the toast automatically closes (works only if the autoClose property is set to true). |
AutoOpen | bool | false | Sets whether the toast will open automatically immediately after widget's initialization. |
Disabled | bool | false | The user will not be able to interact with toast items when disabled is set to true. |
IconClass | string | "null" | Sets custom icon className which overrides the default one. Multiple class names can be applied by separating them with a space. Useful when loading from a third-party icon library (such as Bootstrap). |
ItemClass | string | "null" | Adds a custom class to Toast items. Multiple class names can be applied by separating them with a space. Useful when styling by using predefined class names from a third-party CSS library (such as Bootstrap). |
ItemTemplate | string | "null" | Sets custom item template. |
Locale | string | "en" | Sets or gets the language. Used in conjunction with the property messages. |
Messages | object | N/A | Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. |
Modal | bool | false | In modal mode the toast item is positioned in the center of the screen. This property is with higher priority than position and appendTo. If modal is set to true these properties are disregarded. |
Position | ToastPosition | ToastPosition.TopRight | Sets the part of the browser window where the toast will be positioned. The position property is disregarded if appendTo or modal are set. |
Readonly | bool | false | If the element is readonly, users cannot interact with it. |
RightToLeft | bool | false | Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. |
ShowCloseButton | bool | false | Sets or gets whether to show the toast item's close button. |
Theme | string | "" | Determines the theme. Theme defines the look of the element |
Type | ToastType | ToastType.Info | Sets speciffic CSS settings and icon to the toast items. |
Unfocusable | bool | false | If is set to true, the element cannot be focused. |
Value | object | | Sets a text value to an toast item. |
Name | Type | Arguments | Description |
CloseAll | void | N/A | Closes all opened toast items. |
CloseItem | void | object item | Closes particular toast item.Args: object item - The toast item (or its id) to remove. |
CloseLast | void | N/A | Closes the last opened toast item. |
GetValueAsync() | Task<object> | 'N/A' | Gets the "Value" property as Task<object>. |
Open | object | object value, string iconType | Opens a new toast item and returns the opened smart-toast-item instance. Args: object value - The value for the toast item. If not set, the value property will be used.,string iconType - The icon name for the toast item. If not set, the type property determines the icon type that will be used. |
Open | object | N/A | Opens a new toast item and returns the opened smart-toast-item instance. |
Refresh | void | 'N/A' | Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements. |
Render | void | 'N/A' | Re-renders the Blazor Component. This method will make a full re-render. |
StateHasChanged | void | 'N/A' | Refreshes the state and Re-renders the Blazor Component, if necessary. |
Name | Type | Description | Event Detail |
OnItemClick | EventCallback<Event> | This event is triggered when the toast item is clicked. | N/A |
ItemClicked | event ToastItemClickedEventHandler | This event is triggered when the toast item is clicked. | ToastItemClickedEventArgs |
OnClose | EventCallback<Event> | This event is triggered when the toast item is closed. | N/A |
Closed | event ToastClosedEventHandler | This event is triggered when the toast item is closed. | ToastClosedEventArgs |
OnOpen | EventCallback<Event> | This event is triggered when the toast item is opened. | N/A |
Opened | event ToastOpenedEventHandler | This event is triggered when the toast item is opened. | ToastOpenedEventArgs |
OnSwipebottom | EventCallback<Event> | This event is triggered on swipebottom over an toast item. | N/A |
Swipebottomed | event ToastSwipebottomedEventHandler | This event is triggered on swipebottom over an toast item. | ToastSwipebottomedEventArgs |
OnSwipeleft | EventCallback<Event> | This event is triggered on swipeleft over an toast item. | N/A |
SwipedLeft | event ToastSwipedLeftEventHandler | This event is triggered on swipeleft over an toast item. | ToastSwipedLeftEventArgs |
OnSwiperight | EventCallback<Event> | This event is triggered on swiperight over an toast item. | N/A |
SwipeRight | event ToastSwipeRightEventHandler | This event is triggered on swiperight over an toast item. | ToastSwipeRightEventArgs |
OnSwipetop | EventCallback<Event> | This event is triggered on swipetop over an toast item. | N/A |
Swipetoped | event ToastSwipetopedEventHandler | This event is triggered on swipetop over an toast item. | ToastSwipetopedEventArgs |