blockly > dialog > toast

dialog.toast() function

Displays a temporary notification atop the workspace. Blockly provides a default toast implementation, but developers may provide their own via setToast. For simple appearance customization, CSS should be sufficient.

Signature:

export declare function toast(workspace: WorkspaceSvg, options: ToastOptions): void;

Parameters

Parameter Type Description
workspace WorkspaceSvg The workspace to display the toast notification atop.
options ToastOptions Configuration options for the notification, including its message and duration.

Returns:

void