Toast

A toast is a brief, self-dismissing message that confirms an action or flags a problem without interrupting the user. Inject RhombusToastService — it wraps MatSnackBar for the surface and the CDK LiveAnnouncer for the announcement, colours each severity through the --toast-<variant>-bg / -text tokens, and returns a leak-free RhombusToastRef.

Example

When to use

  • Use a toast for transient, low-stakes feedback (“Post published”, “Could not save”) that does not require the user to stop what they are doing.
  • Use a toast when an action should be briefly reversible — pair it with an Undo action so the consequence stays cheap to recover from.

When not to use

  • When the user must make a decision before continuing, use a Confirm Dialog or a Dialog — a toast can auto-dismiss and must never gate a required choice.
  • For a persistent, in-page status message that stays put (form-level errors, banners), use an Alert instead of a time-limited toast.
  • For status attached to a specific control or element, use a Tooltip rather than a floating, screen-anchored toast.

Related components

  • Alert — persistent, in-flow status messages.
  • Confirm Dialog — blocking yes/no decisions.
  • Dialog — blocking modal surfaces.

Was this page helpful?