toast

fun toast(text: String, type: ToastType = ToastType.Primary, position: ToastPosition? = null, className: String? = null, duration: Duration? = null, destination: String? = null, newWindow: Boolean? = null, close: Boolean? = null, avatar: String? = null, stopOnFocus: Boolean? = null, escapeMarkup: Boolean? = null, oldestFirst: Boolean? = null, ariaLive: String? = null, onClick: () -> Unit? = null, callback: () -> Unit? = null)

Show a toast message.

Parameters

text

message text

type

toast type

position

toast position

className

custom CSS class names

duration

toast duration (default 3 seconds)

destination

URL to open on click

newWindow

open destination in a new window

close

show close button

avatar

URL of the avatar image

stopOnFocus

stop timer when the toast is focused

escapeMarkup

escape HTML in the message

oldestFirst

show oldest toast first

ariaLive

ARIA live attribute

onClick

callback function on click

callback

callback function after the toast is dismissed