Klyroo.Dashboard
0.1.0-preview.2
dotnet add package Klyroo.Dashboard --version 0.1.0-preview.2
NuGet\Install-Package Klyroo.Dashboard -Version 0.1.0-preview.2
<PackageReference Include="Klyroo.Dashboard" Version="0.1.0-preview.2" />
<PackageVersion Include="Klyroo.Dashboard" Version="0.1.0-preview.2" />
<PackageReference Include="Klyroo.Dashboard" />
paket add Klyroo.Dashboard --version 0.1.0-preview.2
#r "nuget: Klyroo.Dashboard, 0.1.0-preview.2"
#:package Klyroo.Dashboard@0.1.0-preview.2
#addin nuget:?package=Klyroo.Dashboard&version=0.1.0-preview.2&prerelease
#tool nuget:?package=Klyroo.Dashboard&version=0.1.0-preview.2&prerelease
Klyroo.Dashboard
Analytical dashboards for .NET developers: a headless controller for filters, views and staged queries, and Blazor blocks that render them.
A dashboard usually fires a dozen queries and one slow or failing query should not blank the page. Klyroo.Dashboard
tracks each query as a resource with its own state, loads the important ones first, and gives every block its own
loading, error and empty states. The state lives in Klyroo.Dashboard.Core, which has no UI dependency, so you can
test it without a renderer. The Blazor components run in a Blazor Web App and in .NET MAUI Blazor Hybrid.
Features
- Staged loading: a resource is Essential (loaded first, in parallel), Background (loaded once the essential ones settle) or Deferred (loaded only when something activates it). A new load cancels the one it supersedes, and
AutoRefreshreloads on a timer. - Per-block states: every block shows a skeleton while loading, the error message with a retry button when its query fails, and an empty state, so one failing query leaves the rest of the page intact.
- Filters and views:
DashboardFilterControlsupports single and multiple selection with a maximum, presets, default values and reset detection, drawn as option lists, text, number and date inputs or your own template, and views appear as tabs with optional badges. - Filters in the URL:
DashboardController.ToQuery,ApplyQueryandMergeQueryare pure, deterministic and AOT-safe, andKlyDashboardPage.SyncUrlkeeps the filters in the query string, in static SSR too, without filling the history. - Drill-down:
OnSelecton bars and charts andOnRowClickon tables and lists hand the pick to your code: a click or Enter on a bar, point or slice of a chart, and real buttons the keyboard reaches in the other blocks. - Ten blocks on a grid of 12 columns by default: stat, stats, gauge (ring or bar), bars (with a funnel variant), chart (bars, lines, areas or donut, drawn by the
KlyChartof Klyroo.UI), list, table, details, feed and alerts, wrapped by a page, a grid and a card. - Comparisons: a stat computes its delta from a previous value, and
DashboardFormat.ResolveComparisonRangegives the previous period or the same dates one year earlier. - Number formatting: nine presets (compact, percent, ratio, delta, points and more), relative times and currency, with an explicit culture.
- CSV export: every block with a menu downloads what it shows, with raw numbers;
DashboardFormat.ExportCsvwrites a UTF-8 byte order mark, picks the delimiter from the culture and neutralizes spreadsheet formulas. - Prerender without a second load: resources created with a
JsonTypeInfohand the data the prerender loaded to the interactive render throughDashboardPersistence, without reflection. - Headless core:
Klyroo.Dashboard.Coremarks itself trimmable and AOT compatible.
Packages
| Package | Description |
|---|---|
Klyroo.Dashboard.Core |
Controller, resources, filters, views and formatting. No UI dependency. |
Klyroo.Dashboard |
Blazor components for Blazor Web Apps and .NET MAUI Blazor Hybrid. Depends on Klyroo.Dashboard.Core and Klyroo.UI. |
For native .NET MAUI apps without a BlazorWebView, the repository also includes Klyroo.Dashboard.Maui (built from source over Klyroo.Dashboard.Core and Klyroo.UI.Maui).
Prerequisites
To use the library in an app:
- The .NET 11 SDK, and an app that targets
net11.0. The packages are prereleases, so everydotnet add packagecommand needs--prerelease. Klyroo.Dashboard.Corealone (controller, resources, formatting, CSV) runs in any .NET 11 app.- A Blazor app for
Klyroo.Dashboard: a Blazor Web App or a .NET MAUI Blazor Hybrid app. Tabs, filters, refresh, sorting and the card menu need an interactive render mode (Interactive Server, WebAssembly or Auto). In a WebAssembly or Auto app, register the services in the server project and in the.Clientproject. - Klyroo.UI set up in the app.
Klyroo.Dashboardbrings the Klyroo.UI package, andAddKlyrooDashboard()registers its services, but the layout still needs the Klyroo.UI stylesheets in<head>and<KlyApp>around the body, as described in the Klyroo.UI installation. - A browser with the native popover API, which Klyroo.UI uses: Chrome and Edge 114, Safari 17 or Firefox 125, or later. In a .NET MAUI app, that means iOS or Mac Catalyst 17, or an Android System WebView 114 or later.
- Network access on the first build only if your app self-hosts web fonts (
KlyrooFont), uses icons outside the built-in set, or compiles Tailwind (KlyrooTailwind): the build downloads them once and caches them underobj/klyroo. Node.js is not needed.
To build this repository you need the .NET 11 SDK (a newer SDK works too, see global.json) and a clone of klyroo-ui in the same parent folder: some projects reference it by relative path (../klyroo-ui/...). See Contributing.
Installation
dotnet add package Klyroo.Dashboard --prerelease
For headless use only, install Klyroo.Dashboard.Core instead.
Register the services in Program.cs of a Blazor Web App (and of the .Client project when you use WebAssembly or Auto), or in MauiProgram.cs:
using Klyroo.Dashboard;
builder.Services.AddKlyrooDashboard();
Add the namespaces to _Imports.razor:
@using Klyroo.UI
@using Klyroo.Dashboard
Load the Klyroo.UI styles and the dashboard stylesheet in the <head> of App.razor. The dashboard stylesheet only contains the utilities the dashboard markup uses and reads the tokens that Klyroo.UI defines, so it comes after them:
<link rel="stylesheet" href="@Assets["_content/Klyroo.UI/klyroo.preflight.css"]" />
<link rel="stylesheet" href="@Assets["_content/Klyroo.UI/klyroo.css"]" />
<link rel="stylesheet" href="@Assets["_content/Klyroo.Dashboard/klyroo-dashboard.css"]" />
Quick start
Headless first. Two resources, one per stage, loaded by a single call:
using Klyroo.Dashboard;
var controller = new DashboardController("sales");
var revenue = controller.RegisterResource(new DashboardResource<double>(
"revenue", async _ => { await Task.Delay(50); return 48_500; }));
var regions = controller.RegisterResource(new DashboardResource<string[]>(
"regions", _ => Task.FromResult(new[] { "EMEA", "AMER" }), DashboardQueryStage.Background));
await controller.RefreshAsync();
Console.WriteLine(DashboardFormat.Format(revenue.Data, DashboardFormatPreset.Compact)); // 48.5K
Console.WriteLine(string.Join(", ", regions.Data!)); // EMEA, AMER
Then the same idea in Blazor. SalesService, Summary and RegionSales stand for your own data access and records:
@inject SalesService Sales
<KlyDashboardPage Dashboard="_dashboard" Title="Sales" Description="Revenue and orders by region">
<KlyDashboardGrid Freshness="true">
<KlyDashboardStat Source="_summary" Label="Revenue" Span="4"
Value="_summary.Data?.Revenue" Compare="_summary.Data?.PreviousRevenue"
Format="DashboardFormatPreset.Compact" />
<KlyDashboardStat Source="_summary" Label="Orders" Span="4"
Value="_summary.Data?.Orders" Format="DashboardFormatPreset.Integer" />
<KlyDashboardGauge Source="_summary" Title="Quota" Span="4" Value="84" Target="90"
Format="DashboardFormatPreset.Percent" />
<KlyDashboardBars Source="_regions" Title="Revenue by region" Span="12"
Items="_regions.Data?.Select(r => new DashboardBarItem(r.Region, r.Revenue)).ToList()"
Format="DashboardFormatPreset.Compact" />
</KlyDashboardGrid>
</KlyDashboardPage>
@code {
private readonly DashboardController _dashboard = new("sales");
private DashboardResource<Summary> _summary = default!;
private DashboardResource<IReadOnlyList<RegionSales>> _regions = default!;
protected override async Task OnInitializedAsync()
{
_summary = _dashboard.RegisterResource(
new DashboardResource<Summary>("summary", ct => Sales.GetSummaryAsync(null, ct)));
_regions = _dashboard.RegisterResource(
new DashboardResource<IReadOnlyList<RegionSales>>(
"regions", ct => Sales.GetRegionsAsync(null, ct), DashboardQueryStage.Background));
await _dashboard.RefreshAsync();
}
}
A block does not read the data of its Source: the source only drives the loading, error and empty states, and you pass the values through the block parameters.
Documentation
| Getting started | Step-by-step first integration |
| Guides | Task-oriented recipes |
| Concepts | How the library works |
| Platforms | Render modes, .NET MAUI, NativeAOT |
| API reference | Every public type and member |
| FAQ | Troubleshooting and limitations |
Compatibility
- .NET 11 SDK.
Klyroo.Dashboard.Coreruns in any .NET 11 app (minimal APIs, workers, console apps, MAUI view models) and declaresIsTrimmableandIsAotCompatible.Klyroo.Dashboardneeds a Blazor Web App or a .NET MAUI Blazor Hybrid app. It declaresIsTrimmablebut notIsAotCompatible, and declares the supported platformsbrowser,ios,android,maccatalystandwindows.- Static SSR renders the blocks, but tabs, filter controls, the refresh button, the table sort and the copy and CSV buttons need an interactive render mode (Interactive Server, WebAssembly or Auto).
- The block texts (Refresh, View as table, Retry and so on) follow the Klyroo.UI locale in the 12 languages of Klyroo.UI, English and French reviewed and the others drafts. Change them with
KlyrooDashboardOptions.Texts(see Guides).
Klyroo ecosystem
Klyroo is a family of independent .NET libraries that compose. Each one has its own repository, versions and releases.
| Library | Description |
|---|---|
| Klyroo.UI | Accessible Blazor components for the web and .NET MAUI Blazor Hybrid, styled with Tailwind CSS v4 |
| Klyroo.Query | Typed query model, URL state sync, and IQueryable / EF Core execution |
| Klyroo.Table | Data lists with table and card-grid layouts, filters, selection and actions |
| Klyroo.Form | Schema-driven forms, validation and wizards |
| Klyroo.Dashboard | Dashboard controller, filters and Blazor blocks: stats, gauges, charts, tables and feeds |
| Klyroo.Display | Code highlighting, secret and file list components, media player controls and file preview |
| Klyroo.Spreadsheet | Import wizard for CSV, TSV and pasted data, with column and value mapping |
| Klyroo.Agent | Bridge that lets AI agents read and act on Klyroo forms, dashboards and imports |
| Klyroo.Hotkey | Server-side .NET client for Hotkey cloud browsers, human handoffs and signed webhooks |
| Klyroo.Stack | Meta-package, MCP documentation server and dotnet new templates |
Contributing
Contributions are welcome. Read CONTRIBUTING.md before opening a pull request, and follow the code of conduct. Report security issues privately as described in SECURITY.md.
License
| Product | Versions 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. net11.0 is compatible. |
-
net10.0
- Klyroo.Dashboard.Core (= 0.1.0-preview.2)
- Klyroo.UI (= 0.1.0-preview.2)
-
net11.0
- Klyroo.Dashboard.Core (= 0.1.0-preview.2)
- Klyroo.UI (= 0.1.0-preview.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Klyroo.Dashboard:
| Package | Downloads |
|---|---|
|
Klyroo.Stack
Umbrella meta-package for the entire Klyroo ecosystem (UI, Query, Table, Form, Dashboard, Display, Spreadsheet, Agent) for Blazor Web and .NET MAUI Hybrid. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.2 | 33 | 11/29/2026 |
| 0.1.0-preview.1 | 40 | 11/29/2026 |