ToastAPI
The API for interacting with toast.
Anchor to standardapiStandardApi
The base API object provided to this and other customer-account
extension targets.
- Anchor to toasttoastToastApirequired
The Toast API displays a non-disruptive message that displays at the bottom of the interface to provide quick, at-a-glance feedback on the outcome of an action.
How to use:
Use toasts to confirm successful actions.
Aim for two words.
Use noun + past tense verb format. For example, `Changes saved`.
For errors, or information that needs to persist on the page, use a banner component.
Docs_Standard_ToastApi
- toast
The Toast API displays a non-disruptive message that displays at the bottom of the interface to provide quick, at-a-glance feedback on the outcome of an action. How to use: - Use toasts to confirm successful actions. - Aim for two words. - Use noun + past tense verb format. For example, \`Changes saved\`. For errors, or information that needs to persist on the page, use a [banner](/docs/api/checkout-ui-extensions/unstable/components/feedback/banner) component.
ToastApi
export interface Docs_Standard_ToastApi
extends Pick<StandardApi<any>, 'toast'> {}
ToastApi
- show
(content: string) => Promise<ToastApiResult>
export interface ToastApi {
show: (content: string) => Promise<ToastApiResult>;
}
ToastApiResult
- hide
() => void
export interface ToastApiResult {
hide: () => void;
}