Skip to content

ToasterConfig

Defined in: ui/Toaster.ts:29

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

Example

// 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'
};

Properties

animationSpeed

animationSpeed: number

Defined in: ui/Toaster.ts:41


maxToasts?

optional maxToasts: number

Defined in: ui/Toaster.ts:33

Maximum number of toasts to show at once


offset?

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


position?

optional position: UICanvasEdge

Defined in: ui/Toaster.ts:31

Position of toasts relative to the screen edges


spacing?

optional spacing: number

Defined in: ui/Toaster.ts:35

Vertical spacing between toasts


stackDirection?

optional stackDirection: "up" | "down"

Defined in: ui/Toaster.ts:39

Direction in which new toasts should stack