BlazorEngine 2.0.1
See the version list below for details.
dotnet add package BlazorEngine --version 2.0.1
NuGet\Install-Package BlazorEngine -Version 2.0.1
<PackageReference Include="BlazorEngine" Version="2.0.1" />
<PackageVersion Include="BlazorEngine" Version="2.0.1" />
<PackageReference Include="BlazorEngine" />
paket add BlazorEngine --version 2.0.1
#r "nuget: BlazorEngine, 2.0.1"
#:package BlazorEngine@2.0.1
#addin nuget:?package=BlazorEngine&version=2.0.1
#tool nuget:?package=BlazorEngine&version=2.0.1
BlazorEngine
BlazorEngine is a library that lets you generate full-featured Blazor UI pages from your C# models and explicit configuration. It is designed for rapid development of CRUD-style apps, admin panels, and internal tools, with minimal boilerplate.
Features
- Automatic UI generation: List, Card, Worksheet, and Two-List (side-by-side) pages are generated from your models.
- Typed menu registration: Register pages with
options.AddMenuItem<TPage>(...)in the host. No assembly scans, metadata files, generated initializers, or custom MSBuild tasks are required. - Action buttons: Override
CreatePageActions()andCreateGridActions()with typed delegates. Action errors propagate to the existing error boundary. - Expression-based fields: Declare fields using
fields.Add(x => x.Name)and fluent customization. Existing model display captions remain supported. - Icon instances: Pass icons directly, such as
new Size20.Run(), without resolving icon types from metadata. - Existing UI behavior: Selection, button visibility, dialogs, Excel export, keyboard refresh, background tasks,
themes, and session-aware
ISecuritychecks remain supported. - Custom Razor pages: You can still write custom Razor components/pages as needed.
How to Use
- Reference BlazorEngine in your Blazor project (WebAssembly, Server, or MAUI Blazor).
- Configure a page explicitly. Existing layout namespaces and lifecycle hooks are retained:
using BlazorEngine.Actions;
using BlazorEngine.Fields;
using BlazorEngine.Layouts;
using Microsoft.AspNetCore.Components;
public class Product
{
public string Name { get; set; } = string.Empty;
}
[Route(Route)]
public class Products : ListPage<Product>
{
public const string Route = "/products";
public override string Title => "Products";
protected override Task ConfigureFields(FieldListBuilder<Product> fields)
{
fields.Add(x => x.Name).Caption("Product name").Required();
return Task.CompletedTask;
}
protected override Task LoadData()
{
Content = new[] { new Product { Name = "Example" } };
return Task.CompletedTask;
}
protected override IReadOnlyList<PageActionDefinition> CreatePageActions() =>
[new("Refresh", RefreshAsync)];
private async Task RefreshAsync()
{
await LoadData();
StateHasChanged();
}
}
- Register menu entries in your host. Blazor's normal Router still handles page routes; a page does not have to be in the menu to be routable or used as a modal/edit form.
builder.Services.AddBlazorEngine(options =>
{
options.AddMenuItem<Products>("Products", Products.Route);
options.AddFooterItem("Issue?", "https://github.com/f4n0/BlazorGenerator", openInNewTab: true);
});
Registrations default to full permissions and can restrict them with PermissionFlags from BlazorEngine.Security.
These flags are intersected with the existing ISecurity provider's permissions; they never override a provider denial.
The legacy permission model has no separate read gate, so Read is reserved rather than adding new access behavior.
Menu order defaults to 999; equally ordered items retain registration order. Action icons keep the existing Filled
Run default, and menu icons keep the Filled Balloon default.
- See the Demo:
Demo/TestShared/DemoRegistration.csis the single registration block shared by all four demo hosts. TheDemo/TestSharedproject contains sample models and demonstrates all features. Explore it for real-world usage.
Getting Started
- Clone this repository.
- Open the solution in Visual Studio.
- Set one of the demo projects (WebAssembly, Server, or MAUI) as the startup project.
- Run (F5) and explore the generated UI.
Special Note for .NET MAUI
Add this script to your index.html before the WebAssembly script:
<script app-name="MauiApp1"
src="./_content/Microsoft.FluentUI.AspNetCore.Components/js/initializersLoader.webview.js"></script>
In the <BlazorEngineApp> tag, add the parameter: BlazorGenRenderMode="null"
Contributing
Contributions are welcome! Open issues or submit pull requests if you have ideas or improvements.
| Product | Versions 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 is compatible. 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. |
-
net10.0
- ClosedXML (>= 0.105.1)
- Microsoft.FluentUI.AspNetCore.Components (>= 5.0.1)
- Microsoft.FluentUI.AspNetCore.Components.Icons (>= 5.0.1)
-
net8.0
- ClosedXML (>= 0.105.1)
- Microsoft.FluentUI.AspNetCore.Components (>= 5.0.1)
- Microsoft.FluentUI.AspNetCore.Components.Icons (>= 5.0.1)
-
net9.0
- ClosedXML (>= 0.105.1)
- Microsoft.FluentUI.AspNetCore.Components (>= 5.0.1)
- Microsoft.FluentUI.AspNetCore.Components.Icons (>= 5.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on BlazorEngine:
| Package | Downloads |
|---|---|
|
BlazorEngine.TestHelper
Give you utility classes for writing UnitTests for BlazorEngine Apps |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.2 | 91 | 11/5/2026 |
| 2.0.1 | 96 | 11/5/2026 |
| 1.0.71 | 178 | 8/19/2026 |
| 1.0.70 | 141 | 8/18/2026 |
| 1.0.69 | 154 | 8/18/2026 |
| 1.0.68 | 151 | 7/23/2026 |
| 1.0.67 | 147 | 7/23/2026 |
| 1.0.66 | 156 | 7/7/2026 |
| 1.0.65 | 145 | 7/6/2026 |
| 1.0.64 | 145 | 7/6/2026 |
| 1.0.63 | 146 | 7/6/2026 |
| 1.0.62 | 176 | 6/25/2026 |
| 1.0.61 | 161 | 6/15/2026 |
| 1.0.60 | 161 | 5/26/2026 |
| 1.0.59 | 155 | 5/19/2026 |
| 1.0.58 | 167 | 5/12/2026 |
| 1.0.57 | 168 | 3/18/2026 |
| 1.0.56 | 146 | 3/18/2026 |
| 1.0.55 | 139 | 3/18/2026 |
| 1.0.54 | 133 | 3/18/2026 |