Toast Messages API
Toast Messages enable you to provide quick and small feedback to users of your application. Canvas enables you to configure Toast Messages to quickly notify the user about an operation through the canvas.toastMessageManager API. The Toast Messages will be displayed as a small pop-up over the current screen without disrupting the current activity and will disappear automatically after the specified duration.
Canvas provides the following types of Toast Messages:
- Information Toast Message– Can be used to not only provide relevant information about the current activity, but also to indicate any useful tips, upcoming events, etc.
- Success Toast Message– Can be used to indicate the successful completion of the current activity.
- Error Toast Message – Can be used to indicate the errors or warnings in the current activity.
For the Information, Success, and Error toast messages, the following parameters (properties) are predefined and cannot be changed:
- position: This parameter is set to bottom-left, which indicates that these three types of toast messages appear at the bottom-left side of the screen.
- icon: This parameter is set to info or success or error, which indicates the type of icon configured for Information, Success, and Error toast messages respectively.
If the developer needs to customize these parameters as well, then the Custom Toast Message needs to be used.
- Custom Toast Message – Can be used to display toast messages that are customized in terms of look and feel, position, duration etc.
Refer the following pages: