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.

// structure
context.banner.show(message, type, autoclose);
‚Äč
// example
context.banner.hide('Hello World!', 'success', true);

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