FormCraft 2.5.0
dotnet add package FormCraft --version 2.5.0
NuGet\Install-Package FormCraft -Version 2.5.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" Version="2.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FormCraft" Version="2.5.0" />
<PackageReference Include="FormCraft" />
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 --version 2.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FormCraft, 2.5.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@2.5.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&version=2.5.0
#tool nuget:?package=FormCraft&version=2.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FormCraft
A powerful, type-safe dynamic form library for Blazor applications with fluent API design.
🌐 Live Demo | 📚 Documentation
Features
- Type-Safe: Strongly typed form builders with compile-time validation
- Fluent API: Intuitive, readable form configuration
- Dynamic Validation: Built-in and custom validators with async support
- Field Dependencies: Fields can react to changes in other fields
- Multiple Layouts: Vertical, horizontal, grid, and inline layouts
- Extensible Rendering: Custom field renderers for any data type
- MudBlazor Integration: Beautiful UI components out of the box
Quick Start
- Install the NuGet package:
dotnet add package FormCraft
- Register services in
Program.cs
:
builder.Services.AddFormCraft();
- Create a form:
var configuration = FormBuilder<MyModel>.Create()
.AddRequiredTextField(x => x.Name, "Full Name")
.AddEmailField(x => x.Email)
.AddNumericField(x => x.Age, "Age", min: 18, max: 100)
.Build();
You can also configure fields using attributes on your model:
public class MyModel
{
[Required]
[TextField("Full Name", "Enter your name")]
public string Name { get; set; } = string.Empty;
}
var configuration = FormBuilder<MyModel>.Create()
.AddFieldsFromAttributes()
.Build();
- Render the form:
<FormCraftComponent TModel="MyModel"
Model="@myModel"
Configuration="@configuration"
OnValidSubmit="@HandleSubmit"
ShowSubmitButton="true" />
Documentation
For detailed documentation and examples, visit our interactive documentation site.
License
This project is licensed under the MIT License.
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 was computed. 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.
-
net8.0
- FluentValidation (>= 12.0.0)
- Microsoft.AspNetCore.Components.Web (>= 8.0.19)
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
-
net9.0
- FluentValidation (>= 12.0.0)
- Microsoft.AspNetCore.Components.Web (>= 9.0.8)
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FormCraft:
Package | Downloads |
---|---|
FormCraft.ForMudBlazor
MudBlazor UI framework implementation for FormCraft dynamic forms. Provides beautiful Material Design components for your dynamic forms. |
GitHub repositories
This package is not used by any popular GitHub repositories.