Skip to content

BlockSuite API Documentation / @blocksuite/blocks / toast

Function: toast()

toast(editorHost, message, duration): HTMLDivElement

Parameters

editorHost: EditorHost

message: string

duration: number= 2500

Returns

HTMLDivElement

Example

ts
toast('Hello World');

Source

packages/blocks/src/_common/components/toast.ts:57