Toast Notifications

Summary

  • Toast Notifications are a configurable way to display messsages
  • They can include Forms if required
  • Toast Notifications are used in Alerts, System Status Messages, Reminders and other Modules

Toast Notifications are rich, highly configurable popup messages.

They are used to inform the User of important messages and updates.

Many modules in AdapTable leverage Toast Notifications including:

If required, Toast Notifications can include buttons, inputs and other UI form elements.

Notifications in AdapTable
Fork
  • This example demonstrates some of the Notification functionality available in AdapTable, including:
    • System Status Messages which can be set via 4 buttons in the Custom Toolbar, and which display the message in the System Status Toolbar
    • A Reminder which will display in 1 minute (after button is clicked in Custom Toolbar)
    • Toast Notifications which display at the top (rather than the default bottom left) of the grid with a bounce effect and 8 second duration
Try It Out

Click the buttons in the Setting Message Buttons Toolbar to see the System Status Message change

Configuring Notifications

By default a Toast Notification will:

  • appear with a sliding action
  • be positioned in the BottomRight of the screen
  • stay for 3 seconds
  • display without a progress bar
  • cannot be dragged
  • will not close when it clicked

However all these settings are configurable in Notification Options.

Caution

These Options are global in AdapTable; changes affect all Toast Notifications e.g. in Alerts & System Status Messages

Toast Notifications
Fork
  • This demo sends System Status messages in the same way as the demo above.
  • However we have overridden some of the default Toast Notification properties as follows:
    • position: 'TopCenter'
    • duration: 5000
    • transition: 'Bounce'
    • showProgressBar: true
    • closeWhenClicked: true
    • pauseWhenHovering: true

Notification Options

Toast Notifications are configured in Notification Options.

closeWhenClicked

Default: false
Boolean
Closes Notification automatically when its clicked

duration

Default: 3000
Number | 'always'
Determines how long a Toast Notification will be displayed

isDraggable

Default: false
Boolean
Whether a Toast Notification can be dragged to a new location

maxNotifications

Default: 3
Number
How many Notifications can be displayed at one time

position

Default: BottomRight
Where the Notification will appear

showApplicationIcon

Default: false
Boolean
Displays the application icon in Notifications

showProgressBar

Default: false
Boolean
Displays a Progress Bar in a Toast Notification

transition

Default: Slide
'Bounce' | 'Slide' | 'Zoom' | 'Flip'
How a Toast Notification will first appear

The full list of properties in Notifications Options is:

PropertyDescriptionDefault
closeWhenClickedCloses Notification automatically when its clickedfalse
durationHow long (in ms) Notifications display for3000
isDraggableCan Notification be draggedfalse
maxNotificationsHow many Notifications can be displayed at one time3
maxSystemMessagesInStoreHow many System Status Messages to hold in State; when limit is reached, oldest Message is removed100
pauseWhenHoveringPauses the Notification when mouse hovers over itfalse
positionWhere Notification will appear (if anywhere)'BottomRight'
showApplicationIconDisplays the application icon in Notificationsfalse
showProgressBarShows a Progress Bar in the Notificationfalse
showSystemStatusMessageNotificationsDisplay System Status Messages as Notificationsfalse
transitionHow Notification will appear: Bounce, Slide, Zoom or Flip'Slide'