Zonit.Extensions.Website.MudBlazor 10.0.0-preview.12

This is a prerelease version of Zonit.Extensions.Website.MudBlazor.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Zonit.Extensions.Website.MudBlazor --version 10.0.0-preview.12
                    
NuGet\Install-Package Zonit.Extensions.Website.MudBlazor -Version 10.0.0-preview.12
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Zonit.Extensions.Website.MudBlazor" Version="10.0.0-preview.12" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zonit.Extensions.Website.MudBlazor" Version="10.0.0-preview.12" />
                    
Directory.Packages.props
<PackageReference Include="Zonit.Extensions.Website.MudBlazor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Zonit.Extensions.Website.MudBlazor --version 10.0.0-preview.12
                    
#r "nuget: Zonit.Extensions.Website.MudBlazor, 10.0.0-preview.12"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Zonit.Extensions.Website.MudBlazor@10.0.0-preview.12
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Zonit.Extensions.Website.MudBlazor&version=10.0.0-preview.12&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Zonit.Extensions.Website.MudBlazor&version=10.0.0-preview.12&prerelease
                    
Install as a Cake Tool

Zonit.Extensions.Website.MudBlazor

Two things in one package: value-object-aware MudBlazor inputs, and three stateless MudBlazor layout primitives. They live in two different namespaces.

NuGet Downloads

dotnet add package Zonit.Extensions.Website.MudBlazor
Component Namespace
ZonitTextField<T>, ZonitTextArea<T> Zonit.Extensions.MudBlazor
PageHeader, EmptyState, LoadingSpinner Zonit.Extensions.Website.MudBlazor

Despite the name it does not reference Zonit.Extensions.Website. Its dependencies are Zonit.Extensions and MudBlazor 9.7.0 (the MudBlazor 9 converter API is required — 8.x will not work).

Setup

This package registers nothing — there is no AddXxx() here. You wire MudBlazor yourself:

using MudBlazor.Services;

builder.Services.AddMudServices();

…plus <MudThemeProvider/>, <MudPopoverProvider/>, <MudDialogProvider/>, <MudSnackbarProvider/> in the host layout and _content/MudBlazor/MudBlazor.min.css / MudBlazor.min.js in the host page. MudBlazor.min.js is required for the Copyable adornment. Pages need an interactive render mode.

In _Imports.razor:

@using Zonit.Extensions                    @* Title, Description, Content, UrlSlug, Url, Culture *@
@using Zonit.Extensions.MudBlazor          @* ZonitTextField<T>, ZonitTextArea<T>                *@
@using Zonit.Extensions.Website.MudBlazor  @* PageHeader, EmptyState, LoadingSpinner             *@
@using MudBlazor

Color is ambiguous. Zonit.Extensions ships a Color value object, so with both namespaces imported Color.Primary is a CS0104 compile error. Write global::MudBlazor.Color.Primary, or add @using Color = MudBlazor.Color. It is the only name shared by the two public surfaces.

Value-object inputs

<EditForm Model="_model" OnValidSubmit="SaveAsync" FormName="article">
    <DataAnnotationsValidator />

    <ZonitTextField @bind-Value="_model.Title"       Label="Title"    Counter="0" />
    <ZonitTextField @bind-Value="_model.Slug"        Label="URL slug" Copyable />
    <ZonitTextField @bind-Value="_model.HomeUrl"     Label="Homepage" OpenNewTab />
    <ZonitTextArea  @bind-Value="_model.Description" Label="Summary"  Counter="0" />

    <MudButton ButtonType="global::MudBlazor.ButtonType.Submit"
               Color="global::MudBlazor.Color.Primary">Save</MudButton>
</EditForm>

T is inferred from @bind-Value — never write T="…". Everything inherited from MudTextField works unchanged.

Supported T (and their Nullable<> forms): Title, Description, Content, UrlSlug, Url, Culture. Any other type compiles with no warning and silently falls back to MudBlazor's reflection-based DefaultConverter<T> — the converter table is an internal, closed switch and is not extensible.

  • Exceptions from the value object's constructor become MudBlazor conversion errors with the technical tail stripped (Title cannot exceed 60 characters.), and the rejected text stays in the input so the user can fix it in place.
  • Counter="0" means "use the value object's MaxLength" → 60 for Title, 160 for Description. For those two, MaxLength is set to max + 1 so the value object gets a chance to throw a real message instead of the browser silently swallowing the keystroke.
  • Clearing a field yields the value object's Empty, never null — even when bound as Title?. Test HasValue; [Required] will not fire.
  • Copyable adds a copy-to-clipboard button. OpenNewTab (only meaningful for Url/Url?) adds an open-in-new-tab button, wired only when the current text parses to an absolute http/https URL — anything else, including relative paths and javascript:, renders an inert icon and opens nothing. OpenNewTab wins over Copyable; the adornment slot holds one button.
  • ZonitTextArea defaults Lines to 3 and rewrites Lines="1" to 3; use ZonitTextField for a single-line input.

Layout primitives

Unopinionated, DI-free, and they ship no CSS. Pass already-translated strings — they do not localize anything.

<PageHeader Title="Articles" Subtitle="Draft, review and publish">
    <Actions><MudButton Color="global::MudBlazor.Color.Primary">New</MudButton></Actions>
</PageHeader>

<LoadingSpinner IsLoading="_loading" Message="Loading…">
    <EmptyState Title="No articles yet" Description="Create your first one." />
</LoadingSpinner>

LoadingSpinner is a content guard, not just a spinner: ChildContent renders only when IsLoading is false — and IsLoading defaults to true, so always bind it.

Trim and AOT

This package's own code is trim- and AOT-clean: converter selection is typeof(T) comparisons, with no reflection and no suppressions. It wraps MudBlazor, however, and MudBlazor 9.7.0 is marked trimmable but not AOT-compatible (MakeGenericType in its converter dispatcher, [RequiresUnreferencedCode] on parts of the form stack). Full NativeAOT publishing therefore depends on MudBlazor, not on us — treat the assembly's IsAotCompatible flag accordingly.

License

MIT.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Zonit.Extensions.Website.MudBlazor:

Package Downloads
Zonit.Dashboard

Zonit dashboard — single-project admin UI built on Zonit.Extensions.Website. Provides drawer/toolbar extension slots, dynamic theme switching, and a MudBlazor-based main layout registered into the website layout registry as "Dashboard.Main".

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.0-preview.27 42 8/17/2026
10.0.0-preview.26 58 8/14/2026
10.0.0-preview.25 49 8/14/2026
10.0.0-preview.24 55 8/12/2026
10.0.0-preview.23 51 8/11/2026
10.0.0-preview.22 48 8/11/2026
10.0.0-preview.21 49 8/11/2026
10.0.0-preview.20 50 8/10/2026
10.0.0-preview.19 58 8/10/2026
10.0.0-preview.18 52 8/9/2026
10.0.0-preview.17 52 8/9/2026
10.0.0-preview.16 57 8/9/2026
10.0.0-preview.15 52 8/7/2026
10.0.0-preview.14 57 8/6/2026
10.0.0-preview.13 57 8/6/2026
10.0.0-preview.12 53 8/6/2026
10.0.0-preview.11 75 8/4/2026
10.0.0-preview.10 64 8/3/2026
10.0.0-preview.9 64 5/16/2026
0.2.12 100 5/8/2026
Loading failed