doo.toast

With Toast messages, you can display easily customizable alerts or notifications to the user.

The toast message appears in the bottom right corner and automatically disappears after a while. You can set the text and title of the toast message.

Functions

There are four predefined functions in the doo.toast namespace:

 

Success

success(text, title?)

Show success notification. Use it for success messages to users. 

Example: 

doo.toast.success('This is really working out.','Great job!');

 

 

 

Info

info(text, title?)

Show info notification. Use this if you need to share any progress info with the user.

Example: 

doo.toast.info('It may take a while.','Warning');

 

Warning

warning(text, title?)

Show warning notification.

Example: 

doo.toast.warning('This is a warning toast message.','Warning!');

 

Error

error(text,title?)

Show error notification.

Example: 

doo.toast.error('That did not work.','Oops!');