Skip to main content

Toast API

The Toast API lets you show brief, non-disruptive notification messages to customers. Use this API to confirm successful actions, surface errors, or provide lightweight feedback that appears temporarily and dismisses automatically.

  • Confirm a completed action: Show a success toast after the customer saves a preference, submits a form, or completes an operation.
  • Surface an error message: Display an error toast when a backend request fails or an action can't be completed, so the customer knows something went wrong.
  • Provide status updates: Notify the customer that a background process like data syncing or a submission has completed.
Support
Targets (24)

The shopify global object provides toast notification functionality for customer account extensions. Access the following properties on shopify to show brief, non-blocking notification messages to the customer.

Anchor to toast
toast
required

Displays brief, non-blocking messages at the bottom of the page to confirm actions or report errors. Use noun + past tense verb format (for example, Changes saved). For persistent messages, use a Banner component instead.


  • Keep messages short: Toast messages should be a few words that confirm what happened, like "Preferences saved" or "Submitted successfully". Avoid long sentences.
  • Don't rely on toasts for critical information: Toasts disappear automatically. If the customer needs to take action, use a banner or inline message instead.

  • Toast messages dismiss automatically after a short duration. You can't control how long they remain visible.
  • Only one toast can be displayed at a time. If you trigger multiple toasts in quick succession, earlier ones may be replaced.
  • Toast notifications don't support interactive elements like links or buttons. Use them for passive feedback only.

Was this page helpful?