Gravity
Search…
Notification
If you need to display feedback to a user in-app you should use a banner notification. These are perfect for displaying unobtrusive messages at the top of the view port, such as when a form error occurs or when an action has completed successfully.
If you want to send notifications while the user hasn't got your app open, you should use a Push Notification.

Showing Banner Notifications

You can show banner notifications from anywhere in your application using the AppContext.
1
// structure
2
context.banner.show(message, type, autoclose);
3
4
// example
5
context.banner.hide('Hello World!', 'success', true);
Copied!

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 1yr ago