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.
Anchor to show method-parametersParameters
Anchor to message
message
string
required
Anchor to opts
opts
Anchor to show method-returnsReturnsstring
string
Was this section helpful?
Anchor to hide methodhide method( )
hide method( )
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.
Anchor to hide method-parametersParameters
string
required
Anchor to hide method-returnsReturnsvoid
void
Was this section helpful?
Toast
shopify.toast.show('Message sent');
Preview

Anchor to examplesExamples
Toasts with different options
Anchor to example-toast-with-durationToast with duration
Toast with duration
Anchor to example-toast-with-actionToast with action
Toast with action
Anchor to example-toast-with-dismiss-callbackToast with dismiss callback
Toast with dismiss callback
Was this section helpful?
Toast with duration
shopify.toast.show('Product saved', {
duration: 5000,
});