Skip to content

Migrating from MudBlazor

DaisyBlazor ships a MudBlazor-compatible API surface so an existing MudBlazor app migrates incrementally — mostly by renaming MudX to X. The enums, icon constants, dialog service and snackbar service keep the same shapes you already use, so most markup and code-behind compiles after a rename with minimal edits.

This is a compatibility layer, not a drop-in clone. DaisyBlazor renders daisyUI markup, so the visual result follows your daisyUI theme rather than Material Design, and a few parameters differ. Migrate a page at a time and adjust as needed.

These live in the DaisyBlazor namespace with the same names and members MudBlazor uses, mapped onto daisyUI tokens:

EnumMembersMaps to
ColorDefault, Inherit, Primary, Secondary, Tertiary, Info, Success, Warning, Error, Dark, SurfacedaisyUI color tokens (Tertiaryaccent, Dark/Surfaceneutral).
VariantText, Filled, Outlinedbtn-ghost / solid / btn-outline (and equivalents on chips, alerts, fields).
SizeSmall, Medium, LargedaisyUI -sm / default / -lg size modifiers.
Typoh1…h6, subtitle1/2, body1/2, button, caption, overline, inheritTailwind text-size + weight scale (used by Typography).
SeverityNormal, Info, Success, Warning, ErrordaisyUI status colors (alerts + snackbars).

Other familiar enums are present too: Justify, AlignItems, MaxWidth, Adornment, Origin, Anchor, Breakpoint, DrawerVariant, ButtonType, SortDirection, InputType, Margin, Underline, Wrap, and more — so Color.Primary, Variant.Outlined, Size.Small, Typo.h6, Severity.Success all keep working after the tag rename.

Icons.Material.Filled.* and Icons.Material.Outlined.* constants exist just like in MudBlazor:

<Button StartIcon="@Icons.Material.Filled.Check">OK</Button>
<Icon Name="@Icons.Material.Filled.Delete" />

The values are Material Symbols ligatures (e.g. Icons.Material.Filled.Check == "check"), rendered by the Icon component via the Material Symbols webfont — so make sure that font is loaded in your host page (see CSS preset). The constant set covers the commonly-used icons; because the values are just ligature strings, you can also pass any Material Symbols name directly (<Icon Name="rocket_launch" />).

Inject IDialogService exactly as before. It’s registered by AddDaisyBlazor(), and a single <DialogProvider /> mounted in your layout renders the dialogs.

@inject IDialogService DialogService
@code {
private async Task Open()
{
DialogParameters parameters = new() { { "Message", "Are you sure?" } };
IDialogReference dialog = await DialogService.ShowAsync<MyDialog>("Confirm", parameters);
}
private async Task Confirm()
{
bool? ok = await DialogService.ShowMessageBoxAsync(
"Delete item", "This cannot be undone.", yesText: "Delete", cancelText: "Cancel");
}
}

Compatible types: IDialogService, DialogParameters (dictionary and collection-initializer syntax) and DialogParameters<T> (the { x => x.Prop, value } selector syntax), DialogOptions, DialogResult, IDialogReference. The built-in confirm dialog is MessageBoxDialog, surfaced through ShowMessageBoxAsync(...) (returns true = yes, false = no, null = canceled/dismissed).

Inject ISnackbar and call Add with a Severity, just like MudBlazor. It’s registered by AddDaisyBlazor(); mount one <SnackbarProvider /> in your layout.

@inject ISnackbar Snackbar
@code {
private void Notify() => Snackbar.Add("Saved!", Severity.Success);
}

ISnackbar exposes Add(message, severity, configure), Remove, Clear, the Shown list and an OnChange event.

MudBlazorDaisyBlazor
AddMudServices()AddDaisyBlazor()
<MudThemeProvider /> + <MudPopoverProvider /><ThemeProvider>…</ThemeProvider> (wraps your layout)
<MudDialogProvider /><DialogProvider />
<MudSnackbarProvider /><SnackbarProvider />
@using MudBlazor@using DaisyBlazor (+ @using DaisyBlazor.Theming)
MudBlazor bundled CSS/JSTailwind v4 + daisyUI build (see Getting started)

Drop the Mud prefix. A representative mapping:

MudBlazorDaisyBlazorNotes
MudButtonButtonColor / Variant / Size / StartIcon / EndIcon.
MudIconButtonIconButton
MudFabFab
MudButtonGroupButtonGroup
MudIconIconName="@Icons.Material.Filled.X".
MudCardCardwith CardHeader / CardContent / CardActions.
MudPaperPaper
MudTableTabledata table (paging/sort); use SimpleTable for static markup.
MudSimpleTableSimpleTable
MudDataGridDataGridcolumn-based grid (PropertyColumn / TemplateColumn).
MudAlertAlertSeverity=….
MudBadgeBadge
MudChipChip
MudAvatarAvatar
MudProgressLinearProgressLinear
MudProgressCircularProgressCircular(also RadialProgress).
MudSkeletonSkeletonSkeletonType.
MudTooltipTooltip
MudTabs / MudTabPanelTabs / Tab
MudExpansionPanels / MudExpansionPanelExpansionPanels / ExpansionPanel
MudMenu / MudMenuItemMenu / MenuItem
MudList / MudListItemList / ListItem
MudBreadcrumbsBreadcrumbs
MudPaginationPagination
MudNavMenu / MudNavLinkMenu / NavMenuLink
MudDrawerDrawer
MudAppBarNavbar
MudTextFieldTextFieldInputType, Adornment.
MudNumericFieldNumericField
MudSelect / MudSelectItemSelect / SelectItem
MudAutocompleteAutocomplete
MudCheckBoxCheckbox
MudSwitchSwitch
MudRadio / MudRadioGroupRadio / RadioGroup
MudSliderRangedaisyUI range.
MudRatingRating
MudDatePickerDatePicker
MudColorPickerColorPicker
MudFileUploadFileInput
MudFormFormwith Validator / ValidatorHint.
MudFieldField
MudGrid / MudItemGrid / Item12-column responsive spans.
MudStackStack
MudContainerContainerMaxWidth.
MudDividerDivider
MudSpacerSpacer
MudTextTypographyTypo=….
MudLinkTextLinkUnderline.
MudThemeProviderThemeProviderparameter-driven; see Theming.

DaisyBlazor also adds daisyUI-native components with no MudBlazor equivalent (Hero, Stats/Stat, Steps/Step, Timeline, ChatBubble, Countdown, Diff, Kbd, Mask, Swap, Dock, Indicator, Status, Carousel, the Mockup* family). See the component reference for the full list.

  1. Replace AddMudServices() with AddDaisyBlazor() and add the Tailwind/daisyUI build (or scaffold a fresh app with dotnet new daisyblazor and copy your pages in).
  2. Swap @using MudBlazor for @using DaisyBlazor (+ @using DaisyBlazor.Theming).
  3. Replace the Mud providers with ThemeProvider / DialogProvider / SnackbarProvider.
  4. Rename MudX tags to X page by page; the enums, Icons.*, IDialogService and ISnackbar keep working. Fix the occasional parameter that differs, and re-check styling against your daisyUI theme.