Toasts are non-blocking notifications used to provide quick feedback to the user about an operation's status. They appear at the top of the Salla Merchant Dashboard and automatically disappear after a few seconds.Usage#
The SDK provides both a generic show method and several convenience methods for common notification types.Most common usage for standard feedback.
API Reference#
Methods#
| Method | Parameters | Description |
|---|
error(message, duration?) | message: string, duration?: number | Displays a red error toast. |
warning(message, duration?) | message: string, duration?: number | Displays an orange warning toast. |
info(message, duration?) | message: string, duration?: number | Displays a blue info toast. |
show(options) | options: ToastOptions | Generic method for triggered a toast with full configuration. |
ToastOptions#
| Property | Type | Required | Default | Description |
|---|
| type | string | Yes | - | Notification type: "success", "error", "warning", or "info". |
| message | string | Yes | - | The message text to display. |
| duration | number | No | 3000 | Visibility duration in milliseconds. |
Keep it brief: Toasts should be readable at a glance. Avoid long sentences.
Avoid Success toast: "Success" is the expected result. No need to notify the user about a successful action; the UI update is enough.
One at a time: The SDK handles queuing, but you should avoid triggering multiple toasts simultaneously for the same action.
Modified at 2026-02-02 10:34:37