DevExtreme v24.2 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

React Toast - Overview

The Toast is a UI component that displays pop-up notifications.

When you need to display a notification, call the notify(message, type, displayTime) method with values for the message, type, and displayTime properties passed as arguments.

DevExtreme Accessibility Compliance
DevExtreme component libraries meet a variety of WCAG and Section 508 compliance standards. To assess this demo’s accessibility level, click the Run AXE® Validation button to launch the AXE® web accessibility evaluation tool.
All trademarks or registered trademarks are property of their respective owners. AXE® Terms of Use
The overall accessibility level of your application depends on the Toast features used.
To give you the ability to edit code on the fly, the demo uses SystemJS. For this reason, launching the demo takes some time. We strongly recommend that you do not use this approach in real projects.
Backend API

You can specify one of the four predefined types of notifications, depending on the mood of the message:

  • 'info'
    A blue toast with a message bubble icon.

  • 'warning'
    A yellow toast with an exclamation mark icon.

  • 'error'
    A red toast with an X icon.

  • 'success'
    A green toast with a check mark icon.

In this demo, toggle check boxes to see the 'success' and 'error' notification types.

You can also customize the Toast appearance. Set the type property to 'custom' and use a contentTemplate. Refer to the following topic for more information: Customize the Content.

If you need to specify other Toast properties in addition to type and displayTime, call the notify(options, type, displayTime) method and pass an object as the argument. In this object, you can set any Toast property, such as shading, position, width, height, and others.