Klyroo.UI.Server 0.1.0-preview.2

This is a prerelease version of Klyroo.UI.Server.
dotnet add package Klyroo.UI.Server --version 0.1.0-preview.2
                    
NuGet\Install-Package Klyroo.UI.Server -Version 0.1.0-preview.2
                    
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="Klyroo.UI.Server" Version="0.1.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Klyroo.UI.Server" Version="0.1.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="Klyroo.UI.Server" />
                    
Project file
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 Klyroo.UI.Server --version 0.1.0-preview.2
                    
#r "nuget: Klyroo.UI.Server, 0.1.0-preview.2"
                    
#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 Klyroo.UI.Server@0.1.0-preview.2
                    
#: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=Klyroo.UI.Server&version=0.1.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Klyroo.UI.Server&version=0.1.0-preview.2&prerelease
                    
Install as a Cake Tool

Klyroo.UI.Server

The server side of Klyroo.UI, for apps that render on an ASP.NET Core server (static server rendering, Interactive Server and Auto prerendering).

A component that renders for a request and has no browser yet, in a static render or a prerender, can read what the browser left in a cookie, such as a time zone. Klyroo.UI is also loaded by WebAssembly and MAUI apps, where there is no ASP.NET Core request, so it only knows the abstraction IKlyRequestCookies. This package implements it over IHttpContextAccessor.

dotnet add package Klyroo.UI.Server --prerelease
using Klyroo.UI;
using Klyroo.UI.Server;

// Program.cs of the server project, not the client project of a WebAssembly or Auto app
builder.Services.AddKlyrooUi();
builder.Services.AddKlyrooServer();

AddKlyrooServer() calls AddHttpContextAccessor() and registers IKlyRequestCookies. Without it nothing breaks: components keep their defaults until the browser is interactive. An interactive render after a prerender has no HTTP request, so IKlyRequestCookies.Get returns null there.

Because a page that reads a request cookie produces HTML shaped for that user, Get marks the response Cache-Control: private (unless private or no-store is already set) and adds Cookie to Vary. If your own middleware manages caching headers, turn this off with AddKlyrooServer(options => options.SetCacheHeaders = false).

The package has the same version as Klyroo.UI and depends on exactly that version. See the repository README.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.2 39 11/29/2026
0.1.0-preview.1 37 11/29/2026

See CHANGELOG.md in the Klyroo.UI package.