showToast( )


Displays a toast notification at the top of a dashboard page.

Toast notification

This function can only be used in page code files for dashboard pages created in the Wix Editor or with Wix Blocks.

The showToast() function returns an object containing a key called remove. The value of remove is a function that removes the toast from the page.

Use the config parameter to:

  • Control the toast's content and appearance.
  • Set callback functions to run when the user sees or closes the toast.
  • Create a clickable call-to-action that displays in the toast.

When showing multiple toasts, requests to display toasts may be queued and the toast may not be displayed immediately. Toasts with a higher priority level are displayed first. A toast's priority is defined using the config.priority parameter. Toasts with the same priority level are displayed in the order they're requested.

Note: When the timeout parameter is set to "none" the toast is rendered into the page layout and pushes the rest of the page down. When timeout is set to "normal", the toast appears on top of other content on the page.

Method Declaration
Copy
Method Parameters
configToastConfigRequired

Toast configuration options.

Returns
Return Type:ToastReturn
Was this helpful?
Yes
No