Toasts are brief, non-intrusive messages that appear over the app and dismiss
themselves. You create them imperatively rather than placing <jig-toast> in a
template: register the feature once with withToasts() in your app providers
(optionally passing default options), then inject injectToastCreator() and call
show(options). A single host region is created automatically and attached to
the app root in the top layer, so toasts stack there wherever they were
triggered from.
Each toast takes a header and content string (or headerTemplate /
contentTemplate for richer markup), an optional icon, and a themed color.
show() returns a handle with a hide() method for dismissing it in code.
The color option selects a themed variant per toast, letting you signal
success, warning, error, and so on.
By default a toast has no close button (closable: false). Set closable: true
to render one; a closable toast can also be dismissed with Escape while
focused.
Toasts auto-hide after autoHide milliseconds (default 5000). Set
autoHide: false to make a toast persistent — it then stays until the user or
your code dismisses it (keep the handle from show() and call hide()).
The icon option renders a glyph ahead of the toast's header, reinforcing the
message's intent alongside its color.
jig