Osirion.Blazor.Theming 4.4.2

Prefix Reserved
dotnet add package Osirion.Blazor.Theming --version 4.4.2
                    
NuGet\Install-Package Osirion.Blazor.Theming -Version 4.4.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="Osirion.Blazor.Theming" Version="4.4.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Osirion.Blazor.Theming" Version="4.4.2" />
                    
Directory.Packages.props
<PackageReference Include="Osirion.Blazor.Theming" />
                    
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 Osirion.Blazor.Theming --version 4.4.2
                    
#r "nuget: Osirion.Blazor.Theming, 4.4.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 Osirion.Blazor.Theming@4.4.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=Osirion.Blazor.Theming&version=4.4.2
                    
Install as a Cake Addin
#tool nuget:?package=Osirion.Blazor.Theming&version=4.4.2
                    
Install as a Cake Tool

Osirion.Blazor.Theming

NuGet License

Theming and styling system for Blazor applications with CSS framework integration and dark mode support.

Features

  • CSS Framework Integration: Seamless integration with Bootstrap, FluentUI, MudBlazor, and Radzen
  • Dark Mode Support: Built-in light/dark theme toggle with system preference detection
  • Palettes: Osirion, Commit, Editor, Studio, Studio Blue and Contrast, each with a light and a dark variant that meets WCAG 2.2 AA (Contrast: AAA), applied before the first paint; code highlighting follows the palette. ThemePicker lets visitors choose one
  • Palette API: ThemingOptions.DefaultPalette, UsePalette, IThemeService.CurrentPalette and SetPalette; the visitor's choice is kept in the osirion-preferred-palette cookie
  • CSS Variables: Consistent theming across components
  • SSR Compatible: Works with Server-Side Rendering and Static SSG
  • Minimal JavaScript: Progressive enhancement for interactive features

Installation

dotnet add package Osirion.Blazor.Theming

Usage

Quick Start

// In Program.cs
using Osirion.Blazor.Components;
using Osirion.Blazor.Theming.Extensions;

builder.Services.AddOsirionTheming(theming => {
    theming
        .UseFramework(CssFramework.Bootstrap)
        .EnableDarkMode()
        .UseSystemPreference();
});
@using Osirion.Blazor.Theming.Components


<OsirionStyles />


<ThemeToggle />

With Custom Variables

builder.Services.AddOsirionTheming(theming => {
    theming
        .UseFramework(CssFramework.Bootstrap)
        .WithCustomVariables("--osirion-action-primary: #0077cc;");
});
<OsirionStyles CustomVariables="--osirion-action-primary: #0077cc;" />

Theme Toggle Component

A button that switches between the light and the dark theme. Id sets the button's id and OnThemeChanged receives the new theme.

<ThemeToggle />

Palettes

builder.Services.AddOsirionTheming(theming => {
    theming
        .UsePalette(ThemePalette.Studio)
        .AllowPaletteSelection();
});
<ThemePicker Label="Palette" FrameworkLabel="Default" />

Palettes limits the choices to the palettes you list. ThemePalette.Framework, the default, applies no palette.

CSS Variables

Some of the variables available for customization:

:root {
    --osirion-action-primary: #0077cc;
    --osirion-action-primary-hover: #005fa3;
    --osirion-action-primary-text: #ffffff;
    --osirion-text-primary: #1f2937;
    --osirion-background-primary: #ffffff;
    --osirion-border-color: #d1d5db;
}

The dark theme redefines the same variables under [data-theme="dark"] and .dark-theme. See the theming guide for the full list.

Documentation

For more detailed documentation, see Styling Documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Osirion.Blazor.Theming:

Package Downloads
Osirion.Blazor

Modern, high-performance Blazor components and utilities. Features SSR-compatible components for navigation, analytics, content management, and theming with seamless CSS framework integration.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.4.2 193 10/29/2026
4.4.1 122 10/29/2026
4.4.0 122 10/29/2026
4.3.0 122 10/29/2026
4.2.0 240 10/18/2026
4.1.0 202 10/17/2026
4.0.0 122 10/12/2026
3.0.1 230 9/24/2026
3.0.0 168 8/5/2026
2.1.18 265 12/14/2025
2.1.17 242 12/14/2025
2.1.16 240 12/14/2025
2.1.15 220 12/12/2025
2.1.14 499 12/11/2025
2.1.13 515 12/11/2025
2.1.12 342 9/4/2025
2.1.11 275 8/31/2025
2.1.10 317 8/29/2025
2.1.9 328 8/29/2025
2.1.8 313 8/27/2025
Loading failed