Skip to main content

Home > 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

ParameterTypeDescription
workspaceWorkspaceSvgThe workspace to display the toast notification atop.
optionsToastOptionsConfiguration options for the notification, including its message and duration.

Returns:

void