Default Light
MgLibrary
Overview
Installation
Buttons
Cards
Charts
Codes
Data Grids
Dropdowns
Editors
Headers & Animations
Icons
Indicators
Inputs
Lists
Modals
Menus
Panels
Pills & Chips
Scheduling
Tabs
Time Line
Trees
Customization

Custom Dialog

A flexible modal container that can host any custom content, forms, or components.

Use this example to explore default behavior, customization points, and accessibility-friendly patterns in a real Blazor page.

Advanced Settings

This is a custom dialog body. You can put anything here.

API Reference

MgDialog

Property Type Default Description
Id string "" Unique dialog id used by the JS interop toggle.
HeaderText string "" Header title displayed in the dialog chrome.
HeaderClasses string "" Extra classes applied to the header container.
DialogBody RenderFragment null! Main dialog content.
DialogFooter RenderFragment null! Optional footer content rendered below the body.

Use @ref to call OpenDialog() and CloseDialog().

An unhandled error has occurred. Reload 🗙