Gravity
Search
⌃K

Notification

Notifications are mobile-style banner messages that appear at the top of the screen or toast notifications in the bottom right.
You can show a notification from anywhere using the ViewContext.
// structure: format and icon are optional to create a toast notification
context.notification.show(message, type, autoclose, format, icon);
// banner example
context.notification.show('Hello World!', 'success', true);
// toast example
context.notification.show('Hello World!', 'success', true, 'toast', 'heart');
// hide
context.notification.hide();

Parameters

prop
description
value
message
the message text to display
string
type
determines the color of the banner
success, error or warning
autoclose
if false, the banner won't disappear until clicking the x icon.
true (default) or false
Last modified 2yr ago