<fx-message>

Description

Display a message to the user.

Attributes

NameDescriptiondefault
level‘modal’, ‘modeless’ or ’ephemeral’ephemeral
‘modal’ - modal dialog window
‘sticky’ - sticky popup message
’ephemeral’ - auto-closing popup messagedefault
appearancehow the message looks, e.g. ’toast’ or ‘banner’. Adds the CSS class appearance-<name>toast
’toast’ - small box in the corner (default look)
‘banner’ - full-width bar at the top with a close button
valueXPath expression which resolves to message

Appearances

level says how important a message is, appearance how it is presented; both can be combined, e.g. <fx-message level="error" appearance="banner">. Every shown message gets the class appearance-<name>, so it can be styled from the page’s CSS (.toastify.appearance-banner { … }).

Custom appearances can be registered in JavaScript and styled via their class:

FxFore.registerMessageAppearance('corner-note', { gravity: 'bottom', position: 'right', duration: 8000 });

An unknown appearance logs a warning and falls back to the default look.

Events

none

Examples