#13608·MudBlazor

MudDialog.Options are not used when dialog is open by MudDialog.ShowAsync()

Author: Daniel-GarmigCreated Aug 10, 2026Updated Sep 25, 2026
Labelsbughelp wanted

Before reporting

  • I searched existing issues
  • I tried in private/incognito browser

What went wrong?

MudDialog component contains the property MudDialog.Options that according to the docs:

"The default options for this dialog. These options are used if none are provided during the MudBlazor.MudDialog.ShowAsync(System.String,MudBlazor.DialogOptions) method. This is typically used for inline dialogs."

The real behavior is that MudDialog.Options are only used in inline dialogs (when the dialog is not open by MudDialog.ShowAsync()).

Seems like all overloads of MudDialog.ShowAsync() provide some DialogOptions; from the method param o using DialogOptions.Default.

See: https://github.com/MudBlazor/MudBlazor/blob/19e04a8bbd848fe3a71c49d5efc97abb7260d8d3/src/MudBlazor/Services/Dialog/DialogService.cs#L95-L98

The only way I found to add default DialogOptions to a dialog is by setting them on initialization (inside my "TestDialog.razor" component):

csharp
protected override async Task OnInitializedAsync()
{
    await MudDialog.SetOptionsAsync(MyDefaultOptions);
}

But this always override DialogOptions provided by the page when opening the dialog using MudDialog.ShowAsync().

In conclusion, there is no way to achieve the behavior described in the docs: set default options for your dialog component when no options are provided by MudDialog.ShowAsync.

Proposed fixes

I have some proposals:

  1. Keep current behavior and update the docs so they clarify the current behavior: Property "MudDialog.Options" only apply for inline dialogs.
  2. Change the behavior.

Some ideas to change the behavior:

  • DialogOptions.Default is only used when no options are already provided (by the MudDialog.Options property or by the MudDialog.ShowAsync() method. (No changes required to the docs?)
  • Add some method to check if the DialogOptions (MudDialog.Options) where added by the user or by default (right now, DialogOptions.Default is internal, so it's not possible to check if the current MudDialog.Options are the default and apply your own defaults. Required changes to the docs, but the user can do this to achieve the expected behavior:
csharp
protected override async Task OnInitializedAsync()
{
    if (MudDialog.Options == DialogOptions.Default)
    {
        await MudDialog.SetOptionsAsync(DefaultOptions);
    }
}

Reproduction link

https://try.mudblazor.com/snippet/mEcAEsFEyqBEnwqq

Reproduction steps

  1. Try button "Open with options" -> Dialog with MaxWidth.ExtraLarge should open as the DialogOptions from the page are used.
  2. Try button "Open without options" -> No options are provided by the page when opening the dialog component. A FullScreen dialog is expected as TestDialog component default DialogOptions.

Version (bug)

v9.8.0

Version (working)

Not tested

Environment

Chrome, Firefox

Blazor rendering mode

Server