| Option | Type | Default | Description |
|---|---|---|---|
message | string | undefined | Toast message content |
title | string | undefined | Title displayed above the message |
position | ToastPosition | 'top-right' | Position of the toast on screen |
durationMs | number | 4000 | Duration in milliseconds before auto-dismiss |
style | 'outline' | 'dash' | 'soft' | undefined | Visual style variant of the toast |
showCloseButton | boolean | false | Show close button on the toast |
customClass | string | undefined | Custom CSS classes to apply |
button | ButtonConfig | undefined | Action button configuration |
| Prop | Type | Default | Description |
|---|---|---|---|
stack | boolean | false | Enable stacked toast display mode |
| Method | Description |
|---|---|
toast(message, options?) | Show a default toast with message |
toast(options) | Show a toast with options object (message inside options) |
toast.success(message, options?) | Show a success toast |
toast.error(message, options?) | Show an error toast |
toast.warning(message, options?) | Show a warning toast |
toast.info(message, options?) | Show an info toast |
toast.loading(message, options?) | Show a loading toast (returns controller) |
Methods available on the returned toast controller (e.g., from toast.loading())
| Method | Description |
|---|---|
t.update(options) | Update the toast with new options |
t.dismiss() | Dismiss the toast manually |
t.success(message, options?) | Update toast to success state |
t.error(message, options?) | Update toast to error state |
t.warning(message, options?) | Update toast to warning state |
t.info(message, options?) | Update toast to info state |
Default: top-right