Dialog

The ArcadiaDialog component renders a modal dialog with optional title, close button, footer actions, and configurable dismissal behavior.

Basic Usage

<ArcadiaDialog @bind-Visible="showDialog" Title="Confirm Action">
    <p>Are you sure you want to proceed?</p>
    <FooterTemplate>
        <button @onclick="() => showDialog = false">Cancel</button>
        <button @onclick="Confirm">Confirm</button>
    </FooterTemplate>
</ArcadiaDialog>

Parameters

ParameterTypeDefaultDescription
VisibleboolfalseWhether the dialog is visible. Supports two-way binding.
Titlestring?nullDialog title displayed in the header.
Widthstring"480px"CSS width of the dialog.
ShowCloseButtonbooltrueWhether the close button is shown in the header.
CloseOnOverlayClickbooltrueWhether clicking the overlay backdrop closes the dialog.
CloseOnEscapebooltrueWhether pressing Escape closes the dialog.
ChildContentRenderFragment?nullDialog body content.
FooterTemplateRenderFragment?nullOptional footer template for action buttons.
Classstring?nullAdditional CSS class names.
Stylestring?nullInline CSS styles.

Events

EventTypeDescription
VisibleChangedEventCallback<bool>Fired when the visible state changes (two-way binding).
OnCloseEventCallbackFired when the dialog is closed.

Accessibility

  • Uses role="dialog" with aria-modal="true".
  • Title is linked via aria-labelledby.
  • Focus is trapped inside the dialog using FocusTrap.
  • Close button uses aria-label="Close dialog".
  • Escape key closes the dialog (configurable via CloseOnEscape).