Skip to content

ToasterConfig

Defined in: ui/Toaster.ts:29

Configuration interface for the Toaster component, which manages toast notifications.

// Basic toaster in top-right corner
const config: ToasterConfig = {
position: 'top right',
maxToasts: 3
};
// Custom toaster with specific spacing and offset
const config: ToasterConfig = {
position: 'bottom center',
maxToasts: 5,
spacing: 15,
offset: { x: 20, y: 30 },
stackDirection: 'up'
};

animationSpeed: number

Defined in: ui/Toaster.ts:41


optional maxToasts: number

Defined in: ui/Toaster.ts:33

Maximum number of toasts to show at once


optional offset: number | { x: number; y: number; }

Defined in: ui/Toaster.ts:37

Distance from screen edges, can be a number for equal x/y or an object for different values


optional position: UICanvasEdge

Defined in: ui/Toaster.ts:31

Position of toasts relative to the screen edges


optional spacing: number

Defined in: ui/Toaster.ts:35

Vertical spacing between toasts


optional stackDirection: "up" | "down"

Defined in: ui/Toaster.ts:39

Direction in which new toasts should stack