Blockbench Reference Docs
    Preparing search index...
    interface ToastNotificationOptions {
        click?: (event: Event) => boolean | void;
        color?: string;
        expire?: number;
        icon?: IconString;
        id?: string;
        onClose?: (event: Event) => boolean | void;
        text: string;
    }
    Index

    Properties

    click?: (event: Event) => boolean | void

    Method to run on click.

    Type Declaration

      • (event: Event): boolean | void
      • Parameters

        Returns boolean | void

        Return true to close toast

    color?: string

    Background color, accepts any CSS color string

    expire?: number

    Expire time in miliseconds

    icon?: IconString

    Blockbench icon string

    id?: string
    onClose?: (event: Event) => boolean | void

    Method to run on close via the close button.

    Type Declaration

      • (event: Event): boolean | void
      • Parameters

        Returns boolean | void

        Return falce to cancel the close

    text: string

    Text message