You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"The Toast API provides temporary notification functionality for POS UI extensions, allowing you to display brief, non-intrusive messages to users for feedback, confirmations, and status updates that automatically disappear after a specified duration. Toast messages appear as overlay notifications that don't interrupt the user's workflow.",
10
+
"The Toast API provides temporary notification functionality for POS UI extensions, allowing you to display brief, non-intrusive messages to users for feedback, confirmations, and status updates that automatically disappear. Toast messages appear as overlay notifications that don't interrupt the user's workflow.",
- **Use appropriate timing:** Choose durations that give users enough time to read without keeping visible too long.
31
30
- **Provide meaningful feedback:** Use toasts to confirm actions, explain errors, or communicate status changes.
32
31
- **Avoid overuse:** Reserve for important feedback. Don't show multiple toasts simultaneously.
33
32
- **Handle multiple toast messages:** Multiple toast messages may overlap or interfere with each other if shown in rapid succession. Consider queuing or spacing out notifications appropriately.
@@ -53,7 +52,7 @@ Toast content is limited to plain text and can't include rich formatting, links,
53
52
'show',
54
53
),
55
54
description:
56
-
"Display a toast notification from a tile. This example demonstrates using `shopify.toast.show()` to display a brief, non-intrusive message that automatically disappears after a specified duration. This is useful for confirmations, status updates, or success messages that don't require user interaction.",
55
+
"Display a toast notification from a tile. This example demonstrates using `shopify.toast.show()` to display a brief, non-intrusive message that automatically disappears. This is useful for confirmations, status updates, or success messages that don't require user interaction.",
Copy file name to clipboardExpand all lines: packages/ui-extensions/src/surfaces/point-of-sale/api/toast-api/toast-api.ts
+1-12Lines changed: 1 addition & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,10 @@
1
-
/**
2
-
* Specifies configuration options for displaying toast notifications. Controls the duration and display behavior of temporary notification messages.
3
-
*/
4
-
exportinterfaceShowToastOptions{
5
-
/**
6
-
* The duration in milliseconds that the toast message should remain visible before automatically dismissing. If not specified, the toast will use the default system duration. Use shorter durations for simple confirmations and longer durations for important messages that users need time to read.
7
-
*/
8
-
duration?: number;
9
-
}
10
-
11
1
exportinterfaceToastApiContent{
12
2
/**
13
3
* Displays a toast notification with the specified text content. The message appears as a temporary overlay that automatically dismisses after the specified duration. Use for providing immediate user feedback, confirming actions, or communicating status updates without interrupting the user's workflow.
14
4
*
15
5
* @param content The text content to display.
16
-
* @param options An object containing ShowToastOptions.
0 commit comments