Skip to main content

Toast

The Toast API displays a non-disruptive message that appears at the bottom of the interface to provide quick and short feedback on the outcome of an action. This API is modeled after the Web Notification API.

The Toast.show method displays a Toast notification in the Shopify admin. It accepts a variety of options to customize the behavior.

string
required

Was this section helpful?

The Toast.hide method hides a Toast notification. This is not required to be called as the Toast notification will automatically hide after the duration has elapsed.

string
required

Was this section helpful?

Toast

shopify.toast.show('Message sent');

Preview

Toasts with different options

Toast with duration

Toast with action

Toast with dismiss callback

Was this section helpful?

Toast with duration

shopify.toast.show('Product saved', {
duration: 5000,
});