ToastModel
Interface representing the Toast class.
Properties
animation ToastAnimationSettingsModel
Specifies the animation settings for showing and hiding of the toast.
Default: { show: { effect: 'FadeIn', duration: 600, easing: 'linear' }, hide: { effect: 'FadeOut', duration: 600, easing: 'linear' }}
buttons ButtonModelPropsModel
Specifies the collection of action buttons to be rendered on the toast.
Default: {}
content String HTMLElement
Specifies the content to be displayed on the toast.
Default: null
cssClass String
Specifies CSS classes to customize the appearance of the control.
Default: ""
enableHtmlSanitizer Boolean
Specifies whether to allow the rendering of untrusted HTML and JavaScript values withing the control. When true, any untrusted strings or scripts will be remote before rendering.
Default: true
enableRtl Boolean
Specifies whether to render the control in right to left direction.
Default: false
enableState Boolean
Specifies whether to persist the state of the control between page loads.
Default: false
extendedTimeout Number
Specifies the display time duration before the toast closes after that toast has been interacted with.
Default: 1000
height String Number
Specifies the height of the toast in pixels using a number or in percentage using string.
Default: auto
icon String
Specifies the class to specify an icon to be displayed in the upper left corner of the toast.
Default: null
locale String
Specifies the culture and localization value for this control, overriding the globally defined value.
Default: en-US
newestOnTop Boolean
Specifies whether the newly created toast notifications should be displayed on top of older toast being displayed.
Default: true
position ToastPositionModel
Specifies the position of the toast notification to be displayed within the target container.
Default: { X: "Left", Y: "Top" }
progressDirection ProgressDirectionType
Specifies the direction of the progress bar.
Default: rtl
showCloseButton Boolean
Specifies whether to show the close button in the toast notification or not.
Default: false
showProgressBar Boolean
Specifies whether to show the progress bar to denote the toast notifications display timeout.
Default: false
soundPath String
Specifies the path to the sound file that will be played when the toast notification is opened.
Default: null
target HTMLElement Element String
Specifies the target container where the toast notification will be displayed. The default container when not set if the document.body.
Default: null
template String Function
Specifies a template to customize how the toast notification is rendered.
Default: null
timeout Number
Specifies the toast notification time duration in milliseconds before the toast closes. Settings timeout to zero requires user interaction to close.
Default: 5000
title String Function
Specifies the title to be displayed in the toast.
Default: null
width String Number
Specifies the width of the control. By default, the width of the control is determined by its parent container. Value can be expressed in percent or pixels.
Default: 300
Events
beforeClose EmitType<ToastBeforeCloseArgs>
Event callback that is raised before the toast is closed.
beforeOpen EmitType<ToastBeforeOpenArgs>
Event callback that is raised before the toast is opened.
click EmitType<ToastClickEventArgs>
Event callback that is raised when the toast is clicked on.
close EmitType<ToastCloseArgs>
Event callback that is raised when the toast is closed.
created EmitType<CreatedEventArgs>
Event callback that is raised when the control has been created.
destroyed EmitType<Object>
Event callback that is raised when the control has been destroyed.
open EmitType<ToastOpenArgs>
Event callback that is raised when the toast is opened.