Osirion.Blazor 2.0.1

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

Osirion.Blazor

NuGet License

Modern, high-performance Blazor components and utilities with SSR compatibility, modular design, and framework integration.

Features

  • Modular Architecture: Use only what you need with dedicated packages
  • SSR Compatible: Works with Server-Side Rendering, Static SSG, Interactive Server, and WebAssembly
  • Zero-JS Dependencies: Core functionality without JavaScript interop
  • Multi-Platform: Supports .NET 8, .NET 9, and future versions
  • Framework Integration: Works with Bootstrap, Tailwind, FluentUI, MudBlazor, and Radzen

Modules

  • Core: Foundation components and utilities
  • Analytics: Clarity and Matomo integration
  • Navigation: Enhanced navigation and scroll components
  • Theming: Theme management with framework integration
  • CMS: Content management with GitHub and FileSystem providers

Installation

Main Package (includes all modules)

dotnet add package Osirion.Blazor

Individual Modules

dotnet add package Osirion.Blazor.Core
dotnet add package Osirion.Blazor.Analytics
dotnet add package Osirion.Blazor.Navigation
dotnet add package Osirion.Blazor.Theming
dotnet add package Osirion.Blazor.Cms

Quick Start

Using the Fluent API

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

builder.Services.AddOsirion(osirion => {
    osirion
        // Configure content providers
        .UseContent(content => {
            content.AddGitHub(options => {
                options.Owner = "username";
                options.Repository = "content-repo";
            });
        })
        
        // Configure analytics
        .UseAnalytics(analytics => {
            analytics.AddClarity(options => {
                options.SiteId = "your-clarity-id";
            });
        })
        
        // Configure navigation
        .UseNavigation(navigation => {
            navigation
                .UseEnhancedNavigation()
                .AddScrollToTop();
        })
        
        // Configure theming
        .UseTheming(theming => {
            theming
                .UseFramework(CssFramework.Bootstrap)
                .EnableDarkMode();
        });
});

Layout Setup

@using Osirion.Blazor.Navigation.Components
@using Osirion.Blazor.Analytics.Components
@using Osirion.Blazor.Theming.Components

<head>
    
    <ThemeProvider>
        
    </ThemeProvider>
</head>

<body>
    <ClarityTracker />
    <MatomoTracker />
    <EnhancedNavigation />
    <ScrollToTop />
    
    <ThemeToggle />
    
    <main>
        @Body
    </main>
</body>

Content Pages

@page "/blog"
@using Osirion.Blazor.Cms.Components

<h1>Blog Posts</h1>

<div class="sidebar">
    <CategoriesList />
    <TagCloud />
    <SearchBox />
</div>

<div class="content">
    <ContentList Directory="blog" />
</div>

Configuration from appsettings.json

{
  "Osirion": {
    "Content": {
      "GitHub": {
        "Owner": "username",
        "Repository": "content-repo",
        "ContentPath": "content",
        "Branch": "main"
      }
    },
    "Analytics": {
      "Clarity": {
        "SiteId": "your-clarity-id"
      },
      "Matomo": {
        "SiteId": "1",
        "TrackerUrl": "//analytics.example.com/"
      }
    },
    "Navigation": {
      "ScrollToTop": {
        "Position": "BottomRight",
        "Behavior": "Smooth"
      }
    },
    "Theming": {
      "Framework": "Bootstrap",
      "EnableDarkMode": true,
      "FollowSystemPreference": true
    }
  }
}
// In Program.cs
builder.Services.AddOsirion(builder.Configuration);

Documentation

License

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

Contributing

We welcome contributions! Please see our contributing guidelines 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.