Trilium Frontend API
    Preparing search index...

    Interface ToastOptions

    interface ToastOptions {
        buttons?: {
            onClick: (api: { dismissToast: () => void }) => void;
            text: string;
        }[];
        dismissible?: boolean;
        icon: string;
        id?: string;
        message: string;
        messageMonospace?: boolean;
        notes?: (string | ToastNoteReference)[];
        notesHeading?: string;
        onRemove?: () => void;
        progress?: number;
        timeout?: number;
        title?: string;
        wide?: boolean;
    }
    Index
    buttons?: { onClick: (api: { dismissToast: () => void }) => void; text: string }[]
    dismissible?: boolean

    When false, the toast renders without its close (×) button so the user can't dismiss it. Use for persistent in-progress toasts whose underlying operation keeps running regardless of the toast — a dismissable × there reads as "cancel", which it isn't. Defaults to dismissable.

    icon: string
    id?: string
    message: string
    messageMonospace?: boolean

    When true, the message is rendered in a monospace font — e.g. a raw error string.

    notes?: (string | ToastNoteReference)[]

    Notes to render as reference links in the toast body — e.g. the notes an action affected or that triggered the message. Each is shown with its icon and title and navigates to the note on click. A plain string is shorthand for a ToastNoteReference without annotation.

    notesHeading?: string

    Optional heading rendered above the notes reference-link list.

    onRemove?: () => void

    Invoked once when the toast is removed, whether it auto-hid after its timeout or was dismissed by the user. Useful for resetting state that accumulated while the toast was live (see notes).

    progress?: number
    timeout?: number
    title?: string
    wide?: boolean

    When true, the toast renders with a wider maximum width than the default. Use for toasts with richer content — e.g. a notes reference-link list — that reads poorly cramped.