Skip to content

Notification

Global toast stack host: show transient success/error/info messages via methods or .toasts array.

HTML tag: c-edf88a08359104e5db444e66d06c4541f

  • app-wide toast / snackbar stack
  • success or error feedback after actions
  • not modal dialogs or inline field errors
PropTypeDefaultDescription
positionStringtop-right
auto_closeNumber5000
pause_on_hoverBooleantrue
newest_on_topBoolean
toastsArray
close_on_clickBooleantrue
pause_on_focus_lossBooleantrue
hide_progress_barBoolean
stackedBoolean
limitNumber
rtlBoolean
enable_multiple_containersBoolean
  • Place once per app shell (often in page template).
  • Call toast(), success(), error(), warning(), info() with message + options.
  • position, auto_close, pause_on_hover, newest_on_top configure stack.
  • Listen toast-added / toast-removed / toast-clicked for analytics.
EventDetail
toast-addedtoast: Object
toast-removedtoastId: String
toast-clickedtoast: Object
SignatureDescription
toast(message: String, options: Object)
success(message: String, options: Object)
error(message: String, options: Object)
warning(message: String, options: Object)
info(message: String, options: Object)
dismiss(toastId: String)
dismissAll()
isActive(toastId: String)
updateToast(toastId: String, options: Object)

Do not use ab-dialog for brief success messages. Do not duplicate multiple notification hosts. Not for inline form validation text (field helpers).

<c-edf88a08359104e5db444e66d06c4541f id="toasts" .position=${'top-right'}></c-edf88a08359104e5db444e66d06c4541f>
<!-- later --> document.querySelector('#toasts').success('Saved')