Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Migrating from MudBlazor

Most MudBlazor components have an IzzyBlazor counterpart, so a page moves over by renaming components and members. The larger change is the render mode. MudBlazor requires every page that uses it to be interactive. IzzyBlazor works on static pages too: sorting, filters and paging are stored in the URL, and forms send a form post.

Running both libraries

The two libraries can run side by side while you move page by page, as in Add to an existing app. A file with @using for both gets ambiguous references, because these types have the same name in both: Color, Align, Justify, Orientation, Direction, Placement, Breakpoint, SelectionMode, Anchor, Shadow, DateRange, DialogService, DialogOptions, DialogResult, DataGridEditMode, FilterOperator, BreadcrumbItem, BreadcrumbSeparator and MenuContext.

You'll hit Color first, because nearly every MudBlazor component accepts Color="Color.Primary". PropertyColumn and TemplateColumn clash as tags (RZ9985), so a file that imports both libraries can't use either one's grid. Move a file to IzzyBlazor whole, or qualify the name (MudBlazor.Color.Primary).

Setup

Replace MudBlazor's services, stylesheet, font, script and providers. Add IzzyBlazor's theme to the head as <IzzyTheme />. There's no script tag, because Blazor loads IzzyBlazor's script itself:

MudBlazor
// Program.cs
builder.Services.AddMudServices();

<!-- App.razor, in <head> -->
<link href="https://fonts.googleapis.com/css2?family=Roboto…" rel="stylesheet" />
<link href="@Assets["_content/MudBlazor/MudBlazor.min.css"]" rel="stylesheet" />
...
<script src="@Assets["_framework/blazor.web.js"]"></script>
<script src="@Assets["_content/MudBlazor/MudBlazor.min.js"]"></script>

<!-- MainLayout.razor -->
<MudThemeProvider />
<MudPopoverProvider />
<MudDialogProvider />
<MudSnackbarProvider />
IzzyBlazor
// Program.cs
builder.Services.AddIzzyBlazor();

<!-- App.razor, in <head> -->
<link rel="stylesheet" href="@Assets["_content/IzzyBlazor.Core/izzyblazor.css"]" />
<IzzyTheme />
...
<script src="@Assets["_framework/blazor.web.js"]"></script>

<!-- MainLayout.razor -->
<ToastRegion />
<DialogHost />
  • MudThemeProvider becomes IzzyTheme, with its Preset, Brand and fonts. It renders on the server, so the theme applies on the first paint. To let the user choose light or dark, add a ColorSchemeSwitch.
  • Remove MudPopoverProvider. Nothing replaces it, because menus, popovers and tooltips use the browser's popover support.
  • MudDialogProvider becomes DialogHost, which must render interactively. In an interactive layout, as a MudBlazor app has, add it as it is. In a static layout, give it a render mode: <DialogHost @rendermode="InteractiveServer" />.
  • MudSnackbarProvider becomes ToastRegion, which works in every render mode.

Replace @using MudBlazor in _Imports.razor with @using IzzyBlazor, and remove any CSS you wrote against MudBlazor's mud- classes. For the rest of setup, see Set up by hand and Themes and presets.

Components

Each MudBlazor component below maps to the IzzyBlazor component that does the same job. IzzyBlazor's fields render their own label, hint and errors, and find their property from @bind-Value, so there's no For.

MudBlazor components and their IzzyBlazor counterparts
MudBlazorIzzyBlazor
MudButtonButton
Color is Accent, and Variant is a ButtonVariant. See Buttons below.
MudIconButtonIconButton
Requires a Label. For MudBlazor's look, add Variant="ButtonVariant.Ghost" Accent="Accent.Neutral".
MudFabFloatingButton
Fixed to a corner of the window. An inline round button has no equivalent yet.
MudFabMenuSpeedDial
Its actions are SpeedDialActions.
MudToggleIconButtonToggleButton
@bind-Toggled is @bind-Value. It accepts Icon, CheckedIcon and IconOnly.
MudButtonGroupButtonGroup
Vertical is Orientation.
MudToggleGroupSegmentedControl, or a CheckboxGroup with Chips
For one value, use a SegmentedControl with Items. For several, use a CheckboxGroup with Chips.
MudToolBarToolbar
What doesn't fit moves into a menu.
MudTextFieldTextField, TextArea, PasswordField
For Lines above one, use a TextArea. For InputType.Password, use a PasswordField. HelperText is Hint, and Adornment is StartIcon or EndIcon.
MudNumericFieldNumberField
Min, Max and Step work as before. HideSpinButtons is StepButtons.
MudSelect, MudSelectItemSelect, or MultiSelect
Pass Items and ItemText instead of item children. The items are the values. To filter as the user types, use Combobox.
MudAutocompleteCombobox, or Autocomplete for free text
SearchFunc is Search, with the same shape. ToStringFunc is ItemText.
MudDatePickerDateField
@bind-Date is @bind-Value, to a DateOnly, DateTime or DateTimeOffset. MinDate and MaxDate are Min and Max. For a calendar on the page, use Calendar.
MudDateRangePickerDateRangeField
Binds an IzzyBlazor.DateRange of DateOnly?.
MudTimePickerTimeField
@bind-Time (TimeSpan?) is @bind-Value to a TimeOnly. For a length of time, use DurationField.
MudCheckBoxCheckbox
Binds a bool. TriState is Indeterminate.
MudSwitchSwitch
MudRadioGroup, MudRadioRadioGroup
Pass Items and ItemText instead of radio children. Chips shows them as chips.
MudChipSet (choosing)RadioGroup or CheckboxGroup with Chips
MudSliderSlider, or RangeSlider for a range
Vertical is Orientation, and ValueLabel is ValueTooltip.
MudRatingRating
@bind-SelectedValue is @bind-Value, and MaxValue is Max.
MudColorPickerColorPicker, or ColorPanel on the page
The value is a hex string, not a MudColor.
MudFileUploadFileUpload
FilesChanged is OnChange, and MaximumFileCount is MaxFiles. On static pages it posts with its Form, as an IFormFile.
MudForm, EditFormForm
See Fields and forms below.
ValidationSummaryFormErrors
Moves focus to itself after a failed submit.
MudFieldFieldFrame
Renders the label, hint and errors for a control of your own.
MudExitPromptForm with ConfirmLeave
MudDataGridDataGrid, or Table
The sort, filters, page and search are stored in the URL. See Data grids below.
MudTableTable
Uses columns instead of RowTemplate cells. ServerData is ItemsProvider, and OnRowClick is RowHref.
MudSimpleTableA <table> in Prose
MudListList, or ListView for items to select or reorder
MudTreeViewTreeView
Accepts Items, ItemChildren and ItemText. ServerData is ChildrenProvider.
MudTimelineTimeline
MudDropContainer, MudDropZoneDropZoneGroup, with a ListView per zone
See Drag and drop below.
MudCarouselCarousel
AutoCycle is Autoplay, ShowArrows is Arrows, ShowBullets is Dots, and SelectedIndex is Index.
MudChartChart, PieChart, HeatmapChart, RadarChart, SankeyChart
A chart accepts Items with Argument and Value expressions, not arrays of series. The rose chart has no equivalent yet.
MudPaginationPagination
Count is PageCount, and @bind-Selected is @bind-Page, or QueryKey for the URL.
IDialogService, MudDialogDialogService, Dialog
Add a DialogHost to the layout. See Dialogs below.
ShowMessageBoxAsync, MudMessageBoxConfirmAsync, or ConfirmButton on static pages
The message comes first. A three-way message box has no equivalent yet.
ISnackbarToastService
Add a ToastRegion to the layout. See Toasts below.
MudPopoverPopover
Has its own trigger: set a Label, or pass a Trigger of your own.
MudMenu, MudMenuItemMenu, MenuItem
ActivatorContent is Trigger, and a nested MudMenu is a MenuSub. For a right-click menu, use ContextMenu.
MudTooltipTooltip
Accepts Text and Placement. Placement is a different enum with the same name.
MudDrawer as a side panelDrawer
A dialog that slides in from an edge.
MudAlertAlert, or Banner for the whole app
Severity is Status, and ShowCloseIcon is Dismissible.
MudProgressLinearProgress
Leave Value out for an indeterminate bar. Buffer has no equivalent yet.
MudProgressCircularProgressCircle, or Spinner with no value
MudSkeletonSkeleton
MudBadgeBadge
An inline label, or Badge on a NavItem or Tab. A badge over a child has no equivalent yet.
MudChip (showing)Tag
OnClose is OnRemove, or RemoveHref on static pages.
MudLayout, MudAppBar, MudDrawer, MudMainContentAppShell, AppHeader, AppSidebar, AppMain
See The app shell below.
MudNavMenu, MudNavLink, MudNavGroupNavMenu, NavItem, NavGroup
Title is Label, and Expanded is Open.
MudTabs, MudTabPanelTabs, Tab
Text is Label. ActivePanelIndex is Selected, by the tab's Value, or QueryKey for the URL. For tabs that go to URLs, use TabNav.
MudBreadcrumbsBreadcrumb
Uses BreadcrumbItem children instead of an Items list.
MudStepper, MudStepStepper, Step
Shows progress only. You render each step's content and buttons. Current counts from 1, where ActiveIndex counts from 0.
MudLinkAnchor
Target="_blank" is External. For a link that looks like a button, use Button with Href.
MudPageContentNavigationOnThisPage
MudGrid, MudItemGrid, GridItem
Sets columns per breakpoint, by minimum width or by template, instead of 12 spans. Spacing is Gap. The breakpoints differ: 640, 768, 1024, 1280 and 1536px.
MudStackStack, Row, Column
Spacing is Gap, and AlignItems is Align. Justify accepts Start, Between and so on.
MudContainerContainer
MaxWidth is Size.
MudPaperBox, or Card
Elevation is Shadow. Bg, Border, Radius and Padding style the box.
MudCardCard
CardHeader, CardBody, CardActions and CardMedia are its parts.
MudExpansionPanelsAccordion
Lets several items open at once unless you set Exclusive, which is MudBlazor's default. Text is Title, and @bind-Expanded is @bind-Open.
MudCollapseCollapsible
MudSplitPanelSplitter
Its panes are SplitterPanes.
MudDivider, MudSpacerDivider, Spacer
MudHiddenHiddenFrom, VisibleFrom
Set them on any component. They work in CSS, so they work on static pages. Breakpoint events in C# have no equivalent yet.
MudTextTextBlock, Heading
Typo.h1 to h6 are a Heading's Level. Body text and captions are a TextBlock's Size.
MudIconIcon
Name="Lucide.Save" instead of a Material SVG string. Title is Label.
MudAvatar, MudImageAvatar, Image
MudHighlighterHighlight
HighlightedText is Query.
MudThemeProviderIzzyTheme, ColorSchemeSwitch
See Setup above.
MudPopoverProvider, MudRTLProvider, MudFocusTrapNot needed
Popovers use the browser's popover support, layouts follow the page's text direction, and dialogs keep focus inside themselves.
MudHotkey, MudSwipeArea, MudScrollToTop, MudOverlayNo equivalent yet

See Components for every component, including ones MudBlazor doesn't have, such as Combobox, TreeList, Scheduler and RichTextEditor.

Render modes

MudBlazor doesn't support static rendering. Its providers must render in the same interactive render mode as the components that use them. So a MudBlazor app is interactive on every page, or adds the providers to each interactive page.

IzzyBlazor's components work on static pages too. An app that keeps every page interactive works as before. You can make pages static one at a time, and a static page doesn't keep a circuit open. Each component's Overview describes what it does in each render mode.

State in the URL

A MudBlazor grid stores its sort, page and filters in the component, and its ServerData reads them from a GridState. A Table or DataGrid stores them in the URL. A sortable header is a link that sets ?sort=name, page numbers set ?page=2, a filter sets ?f-name=, and the search box sets ?search=.

The view survives a reload and can be shared, and it works on static pages.

To keep the state in the component instead, bind it on interactive pages: @bind-Sort, @bind-Page and @bind-Filter. Tabs and Pagination accept a QueryKey to store their state in the URL too. A dialog opens from ?dialog=id.

Buttons

MudButton becomes Button, with Color as Accent and Variant as a ButtonVariant. The defaults differ. MudBlazor's default is a text button in the default color. IzzyBlazor's is a solid button in the primary accent, so a bare <MudButton> becomes Variant="ButtonVariant.Ghost" Accent="Accent.Neutral".

A button with only an icon is an IconButton, which requires a Label. Icons are Lucide's (Lucide.Save).

MudBlazor
<MudButton Variant="Variant.Filled" Color="Color.Primary"
           StartIcon="@Icons.Material.Filled.Save"
           OnClick="SaveAsync" Disabled="_saving">Save</MudButton>

<MudButton Variant="Variant.Outlined"
           OnClick="Cancel">Cancel</MudButton>

<MudIconButton Icon="@Icons.Material.Filled.Delete"
               aria-label="Delete server"
               OnClick="@(() => RemoveAsync(server))" />

<MudButton Href="servers/new" Variant="Variant.Filled"
           Color="Color.Primary">Add server</MudButton>

<MudButton ButtonType="ButtonType.Submit"
           Variant="Variant.Filled"
           Color="Color.Primary">Register</MudButton>
IzzyBlazor
<Button StartIcon="Lucide.Save"
        OnClick="SaveAsync" Loading="_saving">Save</Button>

<Button Variant="ButtonVariant.Outline" Accent="Accent.Neutral"
        OnClick="Cancel">Cancel</Button>

<IconButton Icon="Lucide.Trash" Label="Delete server"
            Variant="ButtonVariant.Ghost" Accent="Accent.Neutral"
            OnClick="() => RemoveAsync(server)" />

<Button Href="servers/new">Add server</Button>

<Button Submit>Register</Button>
MudButton members
MudButtonButton
Variant.FilledButtonVariant.Solid (the default)
Variant.OutlinedButtonVariant.Outline
Variant.Text (MudBlazor's default)ButtonVariant.Ghost
Color.PrimaryAccent.Primary (the default)
Color.Default (MudBlazor's default)Accent.Neutral
Color.ErrorAccent.Danger
Color.Success, Info, WarningAccent.From(Color.Success) and so on, or Accent.Of("#…")
Size.Small, Medium, LargeControlSize.Sm, Md, Lg
StartIcon="@Icons.Material.Filled.Save"StartIcon="Lucide.Save"
Disabled while it worksLoading, which shows a spinner and keeps the button focusable
ButtonType="ButtonType.Submit"Submit
Href with Target="_blank"Href with External
MudIconButton with aria-labelIconButton with Label
Edge, Ripple, DropShadowNone

OnClick runs on interactive pages. Href, Submit and Reset work everywhere. See Button.

Fields and forms

EditForm with a DataAnnotationsValidator, or a MudForm, becomes Form, which adds the validator itself. On interactive pages, it validates as the user edits. On static pages, it sends a form post, even with JavaScript off. It then requires a FormName with a matching [SupplyParameterFromForm].

A field's label comes from [Display] or the property's name, and its required mark comes from [Required]:

MudBlazor
<EditForm Model="@model" OnValidSubmit="Save">
    <DataAnnotationsValidator />
    <MudTextField Label="Name" @bind-Value="model.Name"
                  For="@(() => model.Name)"
                  HelperText="Shown in the server list." />
    <MudSelect T="string" Label="Region"
               @bind-Value="model.Region">
        @foreach (var region in Regions)
        {
            <MudSelectItem Value="@region">@region</MudSelectItem>
        }
    </MudSelect>
    <MudDatePicker Label="Go-live date"
                   @bind-Date="model.GoLive" />
    <MudSwitch @bind-Value="model.Monitoring"
               Label="Monitoring" Color="Color.Primary" />
    <MudButton ButtonType="ButtonType.Submit"
               Variant="Variant.Filled"
               Color="Color.Primary">Create server</MudButton>
</EditForm>

@code {
    private ServerForm model = new();
}
IzzyBlazor
<Form Model="Model" FormName="new-server" OnValidSubmit="Save">
    <FormErrors />
    <TextField @bind-Value="Model!.Name"
               Hint="Shown in the server list." />
    <Select @bind-Value="Model.Region" Items="Regions"
            Placeholder="Choose a region" />
    <DateField @bind-Value="Model.GoLive"
               Label="Go-live date" />
    <Switch @bind-Value="Model.Monitoring" />
    <Button Submit>Create server</Button>
</Form>

@code {
    [SupplyParameterFromForm(FormName = "new-server")]
    private ServerForm? Model { get; set; }

    protected override void OnInitialized() => Model ??= new();

    // In the model, GoLive is a DateOnly? now.
}
MudBlazor field members
MudBlazorIzzyBlazor
For="@(() => model.Name)"None: @bind-Value names the property
HelperTextHint
Required, RequiredError[Required] on the model, and its message
Variant (Text, Filled, Outlined)None: fields have one look
Adornment.Start with AdornmentIconStartIcon, EndIcon, StartAddon or EndAddon
Immediate, DebounceIntervalAn @oninput handler
Lines="4", AutoGrowTextArea with Rows, AutoGrow
Counter with MaxLengthMaxLength, and ShowCount on a TextArea
MudSelect with MudSelectItem Value=Select with Items and ItemText
MudDatePicker @bind-Date (DateTime?)DateField @bind-Value (DateOnly?, DateTime? or DateTimeOffset?; times are in UTC unless you set TimeZone)
MudForm @ref with Validate()Form with OnValidSubmit and OnInvalidSubmit
Color on a checkbox or switchNone

A field's value changes when the user leaves it, not on each keystroke. To update as the user types, as with Immediate, add an @oninput handler. The field passes the handler to the input. See Forms and validation.

Data grids

MudDataGrid becomes a DataGrid, or a Table for a plain list of records, and MudTable becomes a Table. Columns stay in <Columns>, with the same PropertyColumn and TemplateColumn names. ServerData becomes an ItemsProvider.

ToResultAsync applies the search, filters, sort and page to your query. It maps each column's key to its expression, so you don't need a switch on the sort column:

MudBlazor
<MudDataGrid T="Server" ServerData="LoadAsync"
             RowsPerPage="25" Filterable="true">
    <Columns>
        <PropertyColumn Property="s => s.Name" />
        <PropertyColumn Property="s => s.CreatedAt"
                        Title="Created" Format="d" />
        <TemplateColumn Title="Status"
                        SortBy="s => s.Online">
            <CellTemplate>
                @(context.Item.Online ? "Online" : "Offline")
            </CellTemplate>
        </TemplateColumn>
    </Columns>
    <PagerContent>
        <MudDataGridPager T="Server" />
    </PagerContent>
</MudDataGrid>

@code {
    private async Task<GridData<Server>> LoadAsync(
        GridState<Server> state, CancellationToken token)
    {
        var query = Db.Servers.AsNoTracking();
        // Apply state.SortDefinitions and
        // state.FilterDefinitions here, by hand.
        var total = await query.CountAsync(token);
        var items = await query
            .Skip(state.Page * state.PageSize)
            .Take(state.PageSize).ToListAsync(token);
        return new GridData<Server>
            { Items = items, TotalItems = total };
    }
}
IzzyBlazor
<DataGrid TItem="Server" ItemsProvider="LoadAsync"
          ItemKey="s => s.Id.ToString()" PageSize="25"
          Searchable Caption="Servers">
    <Columns>
        <PropertyColumn Property="s => s.Name"
                        Sortable Filterable />
        <PropertyColumn Property="s => s.CreatedAt"
                        Title="Created" Format="d" Sortable />
        <TemplateColumn Title="Status" Context="server"
                        SortBy="s => s.Online" SortKey="status"
                        Sortable>
            @(server.Online ? "Online" : "Offline")
        </TemplateColumn>
    </Columns>
</DataGrid>

@code {
    private async ValueTask<DataResult<Server>> LoadAsync(
        DataRequest<Server> request) =>
        await request.ToResultAsync(
            Db.Servers.AsNoTracking(),
            count: (q, ct) => q.CountAsync(ct),
            list: (q, ct) => q.ToListAsync(ct));
}
MudDataGrid members
MudDataGridDataGrid and Table
T="Server"TItem="Server", or inferred from Items
ServerData with GridState, returning GridDataItemsProvider with DataRequest, returning DataResult; ToResultAsync builds it
state.Page, state.PageSizerequest.Skip, request.Take
state.SortDefinitions, state.FilterDefinitionsrequest.Sort, request.Filter, request.Search
A search box with ReloadServerData()Searchable
RowsPerPage, MudDataGridPagerPageSize; the pager is built in, and PageSizeOptions adds a rows-per-page menu
Filterable on the gridFilterable on each column
DataGridFilterMode.ColumnFilterRowFilterRow
<CellTemplate> with context.ItemThe TemplateColumn's content, with context the item
ToolBarContentToolbarContent
MultiSelection, @bind-SelectedItemsSelectionMode="SelectionMode.Multiple" with ItemKey, @bind-Selection
ChildRowContent, HierarchyColumnDetailTemplate
Groupable, GroupByGroupable on the grid, GroupBy on a column
ColumnResizeMode, DragDropColumnReorderingResizableColumns, ReorderableColumns
Hideable, ShowColumnOptionsColumnPicker
EditModeEditMode (DataGridEditMode.Dialog, Row or Cell) with OnSave
Dense, Hover, HeightSize="ControlSize.Sm", RowHover, MaxHeight
Column Hidden, StickyLeftVisible, Frozen

What behaves differently:

  • Columns opt in. MudBlazor sorts every property column unless you turn it off. A column here sorts only with Sortable and filters only with Filterable.
  • A template column's content is the template, with context the item, not context.Item. To sort it, set SortBy to an expression, and set a SortKey for the URL.
  • The selection is stored by key. With SelectionMode and an ItemKey, @bind-Selection contains the rows' keys, so a selection survives paging and reloading.

See DataGrid and Loading data.

Dialogs

Inject DialogService (a class, with no interface) in place of IDialogService. OpenAsync<T> accepts the title, the parameters by name and the options. It returns the DialogResult itself, so there's no dialog reference to await:

MudBlazor
var parameters = new DialogParameters<DeleteServerDialog>
    { { x => x.Server, server } };
var dialog = await DialogService.ShowAsync<DeleteServerDialog>(
    "Delete server?", parameters,
    new DialogOptions { MaxWidth = MaxWidth.ExtraSmall });
var result = await dialog.Result;
if (result is { Canceled: false, Data: Guid deleted })
{
    // ...
}
IzzyBlazor
var result = await Dialogs.OpenAsync<DeleteServerDialog>(
    "Delete server?",
    new() { [nameof(DeleteServerDialog.Server)] = server },
    new DialogOptions { Size = DialogSize.Sm });
if (!result.Canceled && result.Data is Guid deleted)
{
    // ...
}

Inside the dialog, the cascaded DialogInstance replaces IMudDialogInstance. There are no DialogContent or DialogActions slots. The content goes directly in the dialog, and a DialogFooter written last contains the buttons:

MudBlazor
<MudDialog>
    <DialogContent>
        <MudText>@Server.Name stops at once.</MudText>
    </DialogContent>
    <DialogActions>
        <MudButton OnClick="Cancel">Cancel</MudButton>
        <MudButton Color="Color.Error"
                   OnClick="Delete">Delete server</MudButton>
    </DialogActions>
</MudDialog>

@code {
    [CascadingParameter]
    private IMudDialogInstance MudDialog { get; set; } = null!;

    private void Cancel() => MudDialog.Cancel();

    private void Delete() =>
        MudDialog.Close(DialogResult.Ok(Server.Id));
}
IzzyBlazor
<TextBlock>@Server.Name stops at once.</TextBlock>
<DialogFooter>
    <Button Variant="ButtonVariant.Outline"
            Accent="Accent.Neutral"
            OnClick="() => Dialog.Cancel()">Cancel</Button>
    <Button Accent="Accent.Danger"
            OnClick="Delete">Delete server</Button>
</DialogFooter>

@code {
    [CascadingParameter]
    public DialogInstance Dialog { get; set; } = null!;

    private void Delete() => Dialog.Close(Server.Id);
}
IDialogService members
MudBlazorIzzyBlazor
IDialogServiceDialogService
ShowAsync<T>(…), then await dialog.ResultOpenAsync<T>(…), which returns the DialogResult
DialogParameters<T> { { x => x.Server, server } }new() { [nameof(T.Server)] = server }
IMudDialogInstanceDialogInstance
MudDialog.Close(DialogResult.Ok(x))Dialog.Close(x)
<TitleContent>, <DialogContent>, <DialogActions>The title argument or a DialogHeader, the content itself, a DialogFooter
MaxWidth, FullWidthSize (DialogSize.Sm 384px, Md 512, Lg 768, Xl 1024, Full) or Width
CloseButton, BackdropClickShowCloseButton, CloseOnBackdrop
PositionPlacement: Start and End are side drawers
ShowMessageBoxAsync(title, message, yesText, …) returns bool?ConfirmAsync(message, title, options) returns bool
yesText, cancelTextConfirmText, CancelText
  • Close with the data itself. Call Dialog.Close(server.Id), not Close(DialogResult.Ok(server.Id)). The second still compiles, but the caller's Data is then a DialogResult.
  • A confirm puts the message first. ConfirmAsync(message, title) is the reverse of ShowMessageBoxAsync(title, message), and it returns a bool. It opens with focus on Cancel, and Escape cancels.
MudBlazor
bool? confirmed = await DialogService.ShowMessageBoxAsync(
    "Delete server?",
    $"{server.Name} and its backups will be deleted.",
    yesText: "Delete", cancelText: "Cancel");
if (confirmed == true) { ... }
IzzyBlazor
if (await Dialogs.ConfirmAsync(
        $"{server.Name} and its backups will be deleted.",
        "Delete server?",
        new ConfirmOptions
            { ConfirmText = "Delete", Accent = Accent.Danger }))
{ ... }

A dialog written in the page opens with @bind-Open, a DialogTrigger or a link to ?dialog=id. The last two work on static pages. See Dialog.

Toasts

ISnackbar becomes ToastService, and its toasts appear in the layout's ToastRegion. Call Success, Info, Warning or Error with the message and an optional title:

MudBlazor
Snackbar.Add("Server deleted", Severity.Success);
Snackbar.Add("Couldn't reach the server.", Severity.Error);
Snackbar.Add("Message archived.", Severity.Info, config =>
{
    config.Action = "Undo";
    config.OnClick = snackbar => UnarchiveAsync();
});
IzzyBlazor
Toasts.Success("Server deleted");
Toasts.Error("Couldn't reach the server.", "Connection failed");
Toasts.Info("Message archived.",
    action: new("Undo") { OnClick = () => UnarchiveAsync() });

Toasts work in every render mode. A toast sent while a static page renders appears in that page, and one sent before a redirect appears on the next page. An action with an Href is a link, so it works on static pages too.

Error toasts stay until the user closes them. To keep any toast open, set Duration: TimeSpan.Zero, as with RequireInteraction. The region's Placement and Duration replace the snackbar configuration. See ToastRegion.

Drag and drop

A MudDropContainer with MudDropZones becomes a DropZoneGroup with a ListView per zone. As in MudBlazor, the group contains one list of items and sets which zone each item is in:

MudBlazor
<MudDropContainer T="Ticket" Items="_tickets"
    ItemsSelector="@((item, zone) => item.Status == zone)"
    ItemDropped="Dropped">
    <ChildContent>
        @foreach (var (zone, label) in Columns)
        {
            <MudText Typo="Typo.h6">@label</MudText>
            <MudDropZone T="Ticket" Identifier="@zone"
                         AllowReorder="true" />
        }
    </ChildContent>
    <ItemRenderer>
        <MudPaper Class="pa-3 my-2">@context.Title</MudPaper>
    </ItemRenderer>
</MudDropContainer>

@code {
    private void Dropped(MudItemDropInfo<Ticket> drop) =>
        drop.Item!.Status = drop.DropzoneIdentifier;
}
IzzyBlazor
<DropZoneGroup TItem="Ticket" @bind-Items="_tickets"
               ItemKey="t => t.Id" ZoneOf="t => t.Status"
               OnMove="Moved">
    @foreach (var (zone, label) in Columns)
    {
        <ListView Zone="@zone" Label="@label" Cards
                  ItemText="t => t.Title" />
    }
</DropZoneGroup>

@code {
    private void Moved(ListMoveEventArgs<Ticket> move) =>
        move.Item.Status = move.ToZone!;
}
MudDropContainer members
MudBlazorIzzyBlazor
MudDropContainer T=DropZoneGroup TItem=
ItemsSelector="(item, zone) => item.Status == zone"ZoneOf="t => t.Status"
MudDropZone Identifier="todo"ListView Zone="todo"
ItemRendererItemText, Cards, or the ListView's content
CanDropAccepts on each ListView, and MaxItems
ItemDropped with MudItemDropInfoOnMove with ListMoveEventArgs. It runs before the move, and Cancel undoes it
AllowReorderBuilt in. For a single list, use ListView with Reorderable
NoneA required ItemKey

Each item's handle opens a menu with the same moves. Moving works with the keyboard, on touch and with JavaScript off. With JavaScript off, Name and SubmitOnMove post the moves. Set TItem on the group when it has an OnMove handler. See DropZoneGroup. For a board of cards in columns, Kanban draws the columns, their headers and counts.

The app shell

MudLayout, MudAppBar, MudDrawer and MudMainContent become AppShell, AppHeader, AppSidebar and AppMain. A SidebarToggle opens the sidebar on small screens without any state in your code, and it works with JavaScript off. Style props, such as Padding, replace utility classes such as pa-4:

MudBlazor
<MudLayout>
    <MudAppBar>
        <MudIconButton Icon="@Icons.Material.Filled.Menu"
                       Color="Color.Inherit" Edge="Edge.Start"
                       OnClick="@(() => _open = !_open)" />
        <MudText Typo="Typo.h6">Fleet</MudText>
    </MudAppBar>
    <MudDrawer @bind-Open="_open">
        <MudNavMenu>
            <MudNavLink Href="" Match="NavLinkMatch.All"
                        Icon="@Icons.Material.Filled.Dashboard">
                Dashboard</MudNavLink>
            <MudNavGroup Title="Settings" Expanded="true">
                <MudNavLink Href="users">Users</MudNavLink>
            </MudNavGroup>
        </MudNavMenu>
    </MudDrawer>
    <MudMainContent Class="pa-4">@Body</MudMainContent>
</MudLayout>

@code {
    private bool _open = true;
}
IzzyBlazor
<AppShell>
    <AppHeader>
        <SidebarToggle />
        <AppBrand Href="" Icon="Lucide.Server" Label="Fleet" />
        <Spacer />
        <ColorSchemeSwitch />
    </AppHeader>
    <AppSidebar>
        <NavMenu>
            <NavItem Href="" Match="NavLinkMatch.All"
                     Icon="Lucide.LayoutDashboard">
                Dashboard</NavItem>
            <NavGroup Label="Settings" Open>
                <NavItem Href="users">Users</NavItem>
            </NavGroup>
        </NavMenu>
    </AppSidebar>
    <AppMain>
        <Box Padding="new() { Base = 4, Md = 8 }">@Body</Box>
    </AppMain>
</AppShell>
MudLayout members
MudBlazorIzzyBlazor
MudDrawer @bind-Open with a toggling buttonAppSidebar with a SidebarToggle
DrawerVariant.Responsive, TemporarySmallScreen and Breakpoint on AppSidebar
DrawerVariant.MiniCollapsible, with RememberState
Anchor="Anchor.End"Position="SidebarPosition.End"
MudText Typo.h6 in the barAppBrand, with a required Label
MudThemeProvider IsDarkMode with a toggleColorSchemeSwitch, which offers System, Light or Dark and stores the choice in a cookie
NoneAppFooter, and AppAside for a column at the end

See AppShell.

Next steps

  • Components: Combobox, TreeList, Scheduler and the rest of what you may have built by hand.
  • Render modes: what changes when some pages become static.
  • Tokens and customizing: CSS variables for your own styles beside the components.

Connection lost

Rejoining the server…