Globals

Static properties that let you control the default behavior of some parts of MudBlazor.

EXPERIMENTAL: This feature is under development and may not be ready for general use. Breaking changes will occur between releases. Use only if you are prepared to adapt your code and provide feedback or contribute to its development.

Usage

You can find default setting overrides of some MudBlazor features in the static

class. These defaults should be set when your application initializes, such as when adding MudBlazor services. If they are set after the app has started, they may not take effect until the next page load, or may not take effect at all.
Note: The MudGlobal class is being phased out for visual and theming properties.

Most styling should be done directly through component parameters (for one-off tweaks) or through the theme system and CSS (for app-wide customization).

See the removal issue, or feel free to share feedback on migration or missing theme hooks.

Exception Handler

You can handle MudBlazor component exceptions using MudGlobal.UnhandledExceptionHandler.

// Add MudBlazor services
Services.AddMudServices();

// Send all exceptions to the console
MudGlobal.UnhandledExceptionHandler = (exception) => Console.WriteLine(exception);
An unhandled error has occurred. Reload 🗙