Toast

The toast message widget.

Included in: dx.phonejs.js, dx.webappjs.js, dx.all.js

The main purpose of the dxToast widget is to show a toast message containing specified text.

You can create a widget using one of the following approaches.

  • jQuery
    Use the dxToast jQuery plug-in.

    HTML
    <div id="toast"></div>
    JavaScript
    $("#toast").dxToast({
        message: 'The toast message',
        type: 'success',
        displayTime: 3000
    });
  • Knockout
    Add a div element and apply the dxToast binding to this element.

    HTML
    <div data-bind="dxToast: {
        message: 'The toast message',
        type: 'success',
        displayTime: 3000
    }"></div>
  • Angular
    Add a div element and apply the dx-toast directive to this element.

    HTML
    <div dx-toast="{
        message: 'The toast message',
        type: 'success',
        displayTime: 3000
    }"></div>

Note that DevExtreme widgets require you to link the jQuery and Globalize libraries to your application. If you use the Knockout or Angular approach, the Knockout or Angular library is also required.

See Also

You can find detailed information on the principles of working with the widget in the dxToast section of the Overlay Widgets article.

View Demo

Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the dxToast widget.

Methods

This section describes members used to manipulate the widget.

Events

This section describes events exposed by this widget.