Overview
The hub of the Klyroo ecosystem: one meta-package that registers every Klyroo library, an MCP server that gives coding agents the Klyroo.UI documentation, and dotnet new templates, for .NET developers who build Blazor and .NET MAUI Blazor Hybrid apps.
On this page
Klyroo is a family of independent .NET libraries, each in its own repository with its own versions. This repository ties them together: Klyroo. references the Blazor package of all eight libraries and registers them with one call, Klyroo. does the same for their headless engines, and the templates and the MCP server start a project or an AI session with the right packages and documentation. You can use the hub, or ignore it and install one library on its own.
Prerequisites
To use the library in an app:
- The .NET 10 or .NET 11 SDK, and an app that targets
net10.0ornet11.0. The packages are prereleases, so everydotnet add packagecommand needs--prerelease. - A Blazor app for
Klyroo.: a Blazor Web App or a .NET MAUI Blazor Hybrid app. Interactive components 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 theStack .project.Client - Klyroo.UI set up in the app.
AddKlyrooStack()registers every library, 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/. Node.js is not needed.klyroo - For the MCP server: the .NET 10 runtime or newer, to run the
Klyroo..NET tool, and an MCP client (Claude Code, VS Code, Cursor...).Stack. Mcp - For the project templates:
dotnet new install Klyroo.; theTemplates klyroo-mauitemplate also needs the .NET MAUI workload (dotnet workload install maui) and the SDKs of the platforms you target.
To build this repository you need the .NET 11 SDK (a newer SDK works too, see global.) and clones of klyroo-agent, klyroo-dashboard, klyroo-display, klyroo-form, klyroo-query, klyroo-spreadsheet, klyroo-table and klyroo-ui in the same parent folder: some projects reference them by relative path (../). See Contributing.
Installation
The meta-package
dotnet add package Klyroo.Stack --prereleaseRegister the libraries in Program. (or MauiProgram.), load the stylesheets, and import the namespaces you use:
using Klyroo.Stack;
builder.Services.AddKlyrooStack();<KlyColorModeScript />
<KlyCultureMeta />
<KlyThemeStyle />
<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.Stack/klyroo-stack.css"]" />The three components go before the stylesheets: the first applies the stored color mode before the first paint, the second writes the culture of the request so a WebAssembly client formats like the prerender, and the third sends the theme variables. In a .NET MAUI Blazor Hybrid app, which has no server to render <head>, use <KlyHead /> in the layout instead.
In an app with a WebAssembly client, call AddKlyrooStack() in the server and in the client Program. with the same options. Getting started walks through a complete project.
Individual libraries
Each library has its own registration method and its own repository. AddKlyrooTable() also registers Klyroo.UI and Klyroo.Query, and AddKlyrooForm(), AddKlyroo, AddKlyroo and AddKlyroo also register Klyroo.UI, so you can call only the ones you use:
dotnet add package Klyroo.Table --prerelease
dotnet add package Klyroo.Form --prereleaseusing Klyroo.Form;
using Klyroo.Table;
builder.Services.AddKlyrooTable();
builder.Services.AddKlyrooForm();Each Blazor package ships its own stylesheet next to the Klyroo.UI one when it has components (for example _). The headless engines install the same way: dotnet add package Klyroo..
The MCP server
dotnet tool install --global Klyroo.Stack.Mcp --prerelease
claude mcp add --transport stdio klyroo -- klyroo-stack-mcpThe server covers the components of Klyroo.UI and the Klyroo.Table components that the documentation site describes. It also carries the documentation pages (getting started, guides, concepts, platforms, FAQ and API reference) of Klyroo.Query, Table, Form, Dashboard, Display, Spreadsheet and Agent, at paths such as /, which search-documentation and get-documentation-page read. See the package page for the tools, prompts, resources, options and client configuration.
Project templates
dotnet new install Klyroo.Templates::0.1.0-preview.1| Short name | Creates |
|---|---|
klyroo-saas |
Blazor Web App for a SaaS product: a header with navigation and a color mode button, a dashboard, a filterable accounts list with a form drawer, and a usage page of read-only blocks |
klyroo-admin |
Blazor Web App for a back office: a sidebar shell, a dashboard, a customer list with selection and bulk actions, a customer page, and a spreadsheet import |
klyroo-headless |
Console app with PublishAot that uses Klyroo. only |
klyroo-maui |
.NET MAUI Blazor Hybrid app for Android, iOS, Mac Catalyst and Windows, see Platforms |
dotnet new klyroo-saas -n MyShop
cd MyShop
dotnet runBoth web templates take --interactivity Server|Web (Server by default). Server is one project; WebAssembly and Auto add a . project that holds the pages, the layout and the sample data, and a solution file. The pages show a product name written from the project name (MyShop becomes "My Shop"); --product-name "Acme Cloud" sets another. The app loads the three precompiled stylesheets, so it needs neither Node nor a Tailwind build, and its own layout classes live in wwwroot/: see Style a generated app for what that means for the classes you write. Start a project from a template describes each page.
The templates reference the Klyroo packages at the version of the Klyroo. package that you installed: the version is written into each template when the package is built, so a new release changes it in one place. The CI job templates-from-local-feed packs the nine repositories into a local feed, installs the templates from it, generates the templates, builds them against that feed alone, runs the web apps and publishes the headless one with NativeAOT; Verify the templates against local packages shows the two commands that reproduce it.
The klyroo-saas and klyroo-admin templates were generated in all three interactivity modes, built against locally packed packages, run, and loaded in headless Chrome without console errors.
Run the documentation site locally
The site in site/ is a Blazor Web App (Interactive Server and WebAssembly). It references the sibling repositories by relative path, so clone klyroo-ui, klyroo-query, klyroo-table, klyroo-form, klyroo-dashboard, klyroo-display, klyroo-spreadsheet and klyroo-agent next to this repository, then:
dotnet run --project site/Klyroo.Stack.SiteThe site also hosts live demos of templates as child processes. Set Klyroo__ to start it without them.
The playground
playground/ is a standalone Blazor WebAssembly app with one interactive page per library (/, /, /, /, /, /, /, /) and an index. The result is drawn by the real components and engines running in the browser on sample data, the knobs are real parameters of the library, the code beside the result follows the knobs and can be copied, and the knobs and the state of the lists are kept in the address, so a link restores a view. It needs no server. Publish it for GitHub Pages with:
build/publish-playground.sh <out-dir> [base-path] # base-path defaults to /klyroo-stack/playground/
python3 -m http.server 8000 --directory <parent-of-out-dir>The script writes the app, a 404. that restores the route on GitHub Pages (a deep link such as / lands on it, since Pages has no server routes) and .. The documentation sites link to it from their header and from the home page of each library (playground in docs-site/).
Quick start
Headless first. Klyroo. brings the query engine of Klyroo.Query, so you can filter, sort and page data without any UI:
using Klyroo.Query;
using Klyroo.Stack;
var module = KlyrooStackCatalog.ResolveComponentModule("KlyDataList<Product>")!;
Console.WriteLine($"{module.Name}: {module.CorePackage} + {module.UiPackage}");
var schema = DataListSchema.For<Product>(s => s
.RowKey(p => p.Id)
.Search(p => p.Name)
.Field(p => p.Name, f => f.Key("name").Sortable())
.Field(p => p.Price, f => f.Key("price").Sortable()));
var request = new DataListRequest(
DataListPaging.Offset.ForPage(1, 10),
[new DataListSort("price", Descending: true)],
DataListFilterGroup.Empty);
var result = schema.ExecuteInMemory(
[new Product(1, "Keyboard", 120m), new Product(2, "Monitor", 350m), new Product(3, "Mouse", 40m)],
request);
Console.WriteLine($"{result.TotalCount} products, most expensive first: {result.Items[0].Name}");
sealed record Product(int Id, string Name, decimal Price);This prints Klyroo. and 3 products, most expensive first: Monitor.
Then Blazor. With AddKlyrooStack() registered and the stylesheets loaded, wrap your router in <KlyApp> and use the components:
@page "/"
@inject FormService Forms
<KlyDashboardStat Label="Active accounts" Value="128" Compare="112" />
<KlyButton Label="New account" Color="KlyColor.Primary" OnClick="OpenFormAsync" />
@code {
private sealed class Account
{
public string Name { get; set; } = "";
}
private static readonly FormSchema<Account> NewAccount = FormSchema.For<Account>(s =>
{
s.FormKey = "new-account";
s.Title = "New account";
s.Field(a => a.Name, f => f.Label("Company name").Required());
});
private Task OpenFormAsync() => Forms.CreateFormAsync(NewAccount, mode: FormShellMode.Drawer);
}The page needs <Kly inside <KlyApp> to show the drawer, as in the templates.
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.
global.pins SDK 10.0.100 and rolls forward to a newer major.json - Blazor render modes: Klyroo.UI documents Static SSR, Interactive Server, WebAssembly and Auto. The hub site runs Interactive Server and WebAssembly.
- .NET MAUI Blazor Hybrid:
Klyroo.declaresStack browser,ios,android,maccatalystandwindowsas supported platforms. According to the Klyroo.UI documentation only Android has been run on an emulator so far. - NativeAOT and trimming:
Klyroo.isStack. Core IsAotCompatibleandIsTrimmable.Klyroo.isStack IsTrimmablebut not declared AOT compatible. - The tools and templates need the .NET 10 runtime or newer.
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.