View as Markdown

API reference: @salmonui/notifications/toast

ToasterPropsinterface

import type { ToasterProps } from '@salmonui/notifications/toast';
interface ToasterProps extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'popover'> {
    queue?: ToastQueue | undefined;
    placement?: ToastPlacement | undefined;
    newestOnTop?: boolean | undefined;
    max?: number | undefined;
    container?: Element | null | undefined;
    hotkey?: boolean | undefined;
    localeText?: Partial<ToasterLocaleText> | undefined;
    children?: ReactNode;
    ref?: Ref<HTMLElement> | undefined;
}
ToasterProps members (9)
NameSignatureDescription
queueoptionalqueue?: ToastQueue | undefined;

The queue to render. Default: a queue the Toaster creates, reached with useToast().

placementoptionalplacement?: ToastPlacement | undefined;

Region position. Default 'bottomEnd'.

newestOnTopoptionalnewestOnTop?: boolean | undefined;

Newest toast first in the stack. Default true.

maxoptionalmax?: number | undefined;

Visible toasts; the rest wait in the queue. Default 5.

containeroptionalcontainer?: Element | null | undefined;

Renders the region inside this element (scoped, absolutely positioned; give it position: relative) instead of the top layer. null renders nothing until the element exists.

hotkeyoptionalhotkey?: boolean | undefined;

F6 moves focus into the region and back. Default true.

localeTextoptionallocaleText?: Partial<ToasterLocaleText> | undefined;

Overrides of the built-in strings.

childrenoptionalchildren?: ReactNode;

Content that can call useToast() to reach this queue.

refoptionalref?: Ref<HTMLElement> | undefined;

The region element.