Osirion.Blazor.Theming 2.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Osirion.Blazor.Theming --version 2.1.0
                    
NuGet\Install-Package Osirion.Blazor.Theming -Version 2.1.0
                    
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="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Osirion.Blazor.Theming" Version="2.1.0" />
                    
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 2.1.0
                    
#r "nuget: Osirion.Blazor.Theming, 2.1.0"
                    
#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.
#addin nuget:?package=Osirion.Blazor.Theming&version=2.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Osirion.Blazor.Theming&version=2.1.0
                    
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
  • 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.Theming.Extensions;

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


<ThemeProvider>
    <ThemeToggle />
    
</ThemeProvider>

With Custom Variables

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

Theme Toggle Component


<ThemeToggle />


<ThemeToggle ShowSystemOption="false" />


<ThemeToggle 
    LightLabel="Day" 
    DarkLabel="Night"
    SystemLabel="Auto" />


<ThemeToggle>
    <LightIconTemplate>
        <i class="fas fa-sun"></i>
    </LightIconTemplate>
    <DarkIconTemplate>
        <i class="fas fa-moon"></i>
    </DarkIconTemplate>
</ThemeToggle>

CSS Variables

Core variables available for customization:

:root {
    /* Colors */
    --osirion-primary-color: #2563eb;
    --osirion-primary-color-hover: #1d4ed8;
    --osirion-color: #374151;
    --osirion-color-light: #6b7280;
    --osirion-color-border: #e5e7eb;
    --osirion-color-background: #ffffff;
    --osirion-color-background-light: #f3f4f6;
    
    /* Sizes */
    --osirion-border-radius: 0.5rem;
    --osirion-padding: 1.5rem;
    --osirion-gap: 1.5rem;
    
    /* Effects */
    --osirion-transition-speed: 0.2s;
    --osirion-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark-theme {
    --osirion-primary-color: #60a5fa;
    --osirion-color: #e5e7eb;
    --osirion-color-background: #1f2937;
    /* ...other dark theme overrides */
}

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 net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  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 was computed.  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
2.1.5 110 6/24/2025
2.1.4 137 6/18/2025
2.1.3 71 5/31/2025
2.1.2 73 5/31/2025
2.1.1 150 5/20/2025
2.1.0 143 5/19/2025
2.0.2 156 4/23/2025
2.0.1 161 4/23/2025
2.0.0 165 4/22/2025