View as Markdown

API reference: @salmonui/notifications/toast

ToastQueueSnapshotinterface

import type { ToastQueueSnapshot } from '@salmonui/notifications/toast';
interface ToastQueueSnapshot {
    readonly toasts: readonly ToastState[];
    readonly visible: readonly ToastState[];
    readonly paused: boolean;
}

What getSnapshot() returns; a new object on every change.

ToastQueueSnapshot members (3)
NameSignatureDescription
toastsreadonly toasts: readonly ToastState[];

Every toast, oldest first: the visible ones, then the waiting ones.

visiblereadonly visible: readonly ToastState[];

The first max toasts; the same array while they do not change.

pausedreadonly paused: boolean;

True while paused (hover, focus, hidden document or pause()).