Generic reusable Blazor UI components. Works with both Blazor Server and Blazor WebAssembly. Built on Radzen.Blazor.
Documentation: blazor.tharga.net
dotnet add package Tharga.BlazorRegister services in Program.cs:
builder.Services.AddThargaBlazor(o => o.Title = "My Application");You can also bind configuration from appsettings.json:
builder.Services.AddThargaBlazor(configuration: builder.Configuration);Or combine both (code overrides config):
builder.Services.AddThargaBlazor(o => o.Title = "My App", configuration: builder.Configuration);Configuration section in appsettings.json:
{
"Tharga": {
"Blazor": {
"Title": "Application Name"
}
}
}This registers:
BreadCrumbService(scoped)ILocalStorageServicefrom Blazored.LocalStorageIOptions<BlazorOptions>for configuration
Pre-built button components with busy states and error handling.
ActionButton— Wraps async click actions with automatic loading state, error notifications, and optional delay.StandardButton— Base button with typed styling (Normal,Discrete,Information,Warning,Error,Confirm,Reject).CancelButton— Pre-styled cancel button.CopyButton— Copies text to clipboard via JS interop with success notification.
Route-aware breadcrumb trail with programmatic control.
<BreadCrumbs />Use BreadCrumbService to customize the trail:
@inject BreadCrumbService BreadCrumbService
// Add a virtual segment
BreadCrumbService.AddVirtualSegment("Details", "/items/42");
// Convert a query parameter into a breadcrumb
BreadCrumbService.RegisterVirtualSegmentQueryParam("category");
// Relink or unlink segments
BreadCrumbService.RelinkSegment("Items", "/items?status=active");
BreadCrumbService.UnlinkSegment("Current");<CustomErrorBoundary>
<ChildContent>@Body</ChildContent>
</CustomErrorBoundary>Catches unhandled exceptions, logs them with a correlation ID, and displays an error view with recovery.
ExpandableCard— Collapsible card with optional icon, header menu, and local storage state persistence.Loading— Indeterminate progress indicator (centered or inline).Title— Dynamic page title based on route andBlazorOptions.Title.DateTimeView— Formatted date/time display with relative duration tooltip.TimeSpanView— Formatted time span display.
- .NET 9
- .NET 10
dotnet build -c Release
dotnet test -c ReleaseMIT