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
<PackageReference Include="Osirion.Blazor.Theming" Version="4.4.2" />
<PackageVersion Include="Osirion.Blazor.Theming" Version="4.4.2" />
<PackageReference Include="Osirion.Blazor.Theming" />
paket add Osirion.Blazor.Theming --version 4.4.2
#r "nuget: Osirion.Blazor.Theming, 4.4.2"
#:package Osirion.Blazor.Theming@4.4.2
#addin nuget:?package=Osirion.Blazor.Theming&version=4.4.2
#tool nuget:?package=Osirion.Blazor.Theming&version=4.4.2
Osirion.Blazor.Theming
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.
ThemePickerlets visitors choose one - Palette API:
ThemingOptions.DefaultPalette,UsePalette,IThemeService.CurrentPaletteandSetPalette; the visitor's choice is kept in theosirion-preferred-palettecookie - 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 | Versions 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. |
-
net10.0
- AngleSharp (>= 1.8.5)
- BlazorJSComponents (>= 1.0.0)
- HtmlSanitizer (>= 9.2.1039)
- Microsoft.AspNetCore.Components (>= 10.0.14)
- Microsoft.AspNetCore.Components.Web (>= 10.0.14)
- Microsoft.Extensions.Configuration (>= 10.0.14)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.14)
- Microsoft.Extensions.DependencyInjection (>= 10.0.14)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.14)
- Osirion.Blazor.Core (>= 4.4.2)
-
net9.0
- AngleSharp (>= 1.8.5)
- BlazorJSComponents (>= 1.0.0)
- HtmlSanitizer (>= 9.2.1039)
- Microsoft.AspNetCore.Components (>= 9.0.21)
- Microsoft.AspNetCore.Components.Web (>= 9.0.21)
- Microsoft.Extensions.DependencyInjection (>= 9.0.21)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.21)
- Osirion.Blazor.Core (>= 4.4.2)
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 |