All Products
Search
Document Center

SuperApp:Toast

Last Updated:Jun 23, 2026

The WVUIToast JavaScript API displays toast notifications in your H5 or mini apps.

WVUIToast.toast

Displays a toast message in the center of the screen.

iOS

Android

WVUIToast_toast_iOS@2x.png

WVUIToast_toast_Android@2x.png

Input parameters

  • [string] message: The message to display in the toast.

  • [number] duration: (Optional) The display duration in seconds. The default value is 0.8.

Callback parameters

The success callback runs after the toast is dismissed and receives no parameters. The failure callback runs when the toast fails to display and receives an error object.

var params = {
        // The message to display.
        message: 'Toast information',
        // Display duration in seconds.
        duration: 5
};
window.WindVane.call('WVUIToast', 'toast', params, function(e) {
}, function(e) {
        alert('failure: ' + JSON.stringify(e));
});