Svelte UI

Toast

Setup

Mount a single <Toaster /> once at your app root (e.g. the root layout), then push toasts from anywhere by importing toast. The store lives outside any page, so calls work from components, load functions, event handlers, etc.

Variants

Five status variants. Click to fire one (auto-dismisses after 4s by default).

Options — timeout + size

timeout is the auto-dismiss delay in ms (0 = sticky, dismiss with the × button); size takes the shared sm/md/lg axis.