Dialog

A dialog is a modal surface that focuses the user on a single, self-contained task. <rhombus-dialog> supplies the standard chrome — a heading, body, and an [rhombusDialogActions] footer with aria-labelledby wiring — while RhombusDialogService opens any component with the library's defaults (focus trap, restore-focus, panel theming) and returns a leak-free RhombusDialogRef.

Example

When to use

  • Use a dialog for a focused, interactive task that warrants interrupting the flow — a rename, a move, a short form — where the user should resolve it before returning to the page.
  • When the task must block the rest of the UI until it is completed or dismissed, and benefits from a captured, trapped focus context.

When not to use

  • For a simple yes/no decision (delete, discard, confirm), use a Confirm Dialog — it builds on this service with a ready-made prompt.
  • For passive, non-blocking feedback after an action, use a Toast.
  • For a rich panel anchored to a trigger that should leave the page visible, use a Popover; for a flat list of actions, a Menu.

Related components

  • Confirm Dialog — prebuilt yes/no prompt on this service.
  • Popover — non-blocking panels off a trigger.
  • Toast — transient, non-blocking feedback.
  • Button — the triggers and footer actions.

Was this page helpful?