FormCraft.ForMudBlazor 4.0.0

dotnet add package FormCraft.ForMudBlazor --version 4.0.0
                    
NuGet\Install-Package FormCraft.ForMudBlazor -Version 4.0.0
                    
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="FormCraft.ForMudBlazor" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FormCraft.ForMudBlazor" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="FormCraft.ForMudBlazor" />
                    
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 FormCraft.ForMudBlazor --version 4.0.0
                    
#r "nuget: FormCraft.ForMudBlazor, 4.0.0"
                    
#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 FormCraft.ForMudBlazor@4.0.0
                    
#: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=FormCraft.ForMudBlazor&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=FormCraft.ForMudBlazor&version=4.0.0
                    
Install as a Cake Tool

FormCraft.ForMudBlazor

MudBlazor UI framework implementation for FormCraft dynamic forms.

Installation

dotnet add package FormCraft.ForMudBlazor

Usage

// In Program.cs
builder.Services.AddFormCraft();
builder.Services.AddFormCraftMudBlazor();

Project Structure

The project is organized by feature, with each field type having its own folder containing both the component and renderer:

FormCraft.ForMudBlazor/
├── Extensions/
│   └── ServiceCollectionExtensions.cs    # DI registration
├── Features/
│   ├── TextField/
│   │   ├── MudBlazorTextFieldComponent.razor
│   │   └── MudBlazorTextFieldRenderer.cs
│   ├── NumericField/
│   │   ├── MudBlazorNumericFieldComponent.razor
│   │   └── MudBlazorNumericFieldRenderer.cs
│   ├── BooleanField/
│   │   ├── MudBlazorBooleanFieldComponent.razor
│   │   └── MudBlazorBooleanFieldRenderer.cs
│   ├── DateTimeField/
│   │   ├── MudBlazorDateTimeFieldComponent.razor
│   │   └── MudBlazorDateTimeFieldRenderer.cs
│   ├── SelectField/
│   │   ├── MudBlazorSelectFieldComponent.razor
│   │   └── MudBlazorSelectFieldRenderer.cs
│   ├── FileUploadField/
│   │   ├── MudBlazorFileUploadFieldComponent.razor
│   │   └── MudBlazorFileUploadFieldRenderer.cs
│   ├── CustomFields/
│   │   └── RatingRenderer.cs
│   ├── FormContainer/
│   │   ├── FormCraftComponent.razor
│   │   └── FormCraftComponent.razor.cs
│   └── Validation/
│       ├── FieldValidationMessage.razor
│       └── FieldValidationMessage.razor.cs

⚠️ Moved to FormCraft core (#279) — breaking

DynamicFormValidator<TModel> used to live in this package, in namespace FormCraft.ForMudBlazor. It references nothing from MudBlazor, so a second UI adapter could not reuse it without copying — it now lives in FormCraft core as FormCraft.DynamicFormValidator<TModel>, and both adapters render the same component.

If you name it in your own markup, add @using FormCraft to that file (or your _Imports.razor) — @using FormCraft.ForMudBlazor alone no longer finds it:

@using FormCraft
@using FormCraft.ForMudBlazor

<EditForm EditContext="@editContext">
    <DynamicFormValidator TModel="MyModel" Configuration="@formConfig" />
</EditForm>

Most applications never name it: <FormCraftComponent TModel="..." /> renders it for you, and that is unchanged. No forwarding shim was left behind on purpose — both packages surface types in namespace FormCraft, so a same-named shim here would make DynamicFormValidator an ambiguous reference (CS0104) in any file importing both namespaces, which is the normal setup and would break more callers than it rescued.

MudBlazorUIFrameworkAdapter was removed in the same release, along with the core IUIFrameworkAdapter, FrameworkAgnosticFieldRenderer<T> and UIFrameworkConfiguration types it implemented. Nothing consumed them; the real extension point is FieldRendererBase plus DI registration order.

.WithNativeRequired(...) also moved to core, but its namespace is unchanged (FormCraft in both packages), so existing call sites compile untouched.

Features

  • Feature-based organization: Each field type is self-contained with its component and renderer
  • MudBlazor components: Uses MudBlazor's rich component library
  • Type-safe rendering: Strong typing throughout the rendering pipeline
  • Validation support: Integrated validation with MudBlazor's validation system
  • Custom field support: Extensible architecture for custom field types

Creating Custom Fields

To add a new field type:

  1. Create a new feature folder under Features/
  2. Add your component (.razor file) and renderer (.cs file)
  3. Register the renderer in ServiceCollectionExtensions.cs

Example:

// Features/ColorPickerField/MudBlazorColorPickerFieldRenderer.cs
public class MudBlazorColorPickerFieldRenderer : FieldRendererBase
{
    protected override Type ComponentType => typeof(MudBlazorColorPickerFieldComponent<>);
    public override bool CanRender(Type fieldType, IFieldConfiguration<object, object> field)
        => fieldType == typeof(string) && field.AdditionalAttributes.ContainsKey("color-picker");
}

// Features/ColorPickerField/MudBlazorColorPickerFieldComponent.razor
@namespace FormCraft.ForMudBlazor.Features.ColorPickerField
@typeparam TModel
@inherits FieldComponentBase<TModel, string>

<MudColorPicker T="string" 
                Label="@Label" 
                @bind-Value="@CurrentValue" 
                Required="@IsRequired"
                ReadOnly="@IsReadOnly"
                Disabled="@IsDisabled" />

Dependencies

  • FormCraft (core library)
  • MudBlazor (UI components)
  • Microsoft.AspNetCore.Components.Web

License

This package is part of the FormCraft project and follows the same MIT license.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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 FormCraft.ForMudBlazor:

Package Downloads
AgileExtensionBuilder.Host.Plugins.DecsPR

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0 1,008 9/25/2026
3.1.0 6,392 6/10/2026
3.0.1 140 6/10/2026
3.0.0 144 6/10/2026
2.5.0 6,865 8/8/2025
2.4.0 482 7/16/2025
2.3.0 272 7/8/2025
2.2.0 343 7/2/2025
2.1.0 332 6/19/2025
2.0.0 393 6/10/2025